shithub: aubio

Download patch

ref: d94afb37f953f5d7cad9881dac42bff1e3b66f9c
parent: e7edf9286e9966e4207f269248f871b72b25f1af
author: Paul Brossier <piem@piem.org>
date: Wed Nov 28 20:07:15 EST 2018

[tests] [win] use calloc to work around constant size issue

--- a/tests/utils_tests.h
+++ b/tests/utils_tests.h
@@ -117,7 +117,7 @@
 {
   const int argc = 2;
   int err = 0;
-  char* argv[argc];
+  char** argv = (char**)calloc(argc, sizeof(char*));
   char sink_path[PATH_MAX] = "tmp_aubio_XXXXXX";
   int fd = create_temp_sink(sink_path);
   if (!fd) return 1;
@@ -125,5 +125,6 @@
   argv[1] = sink_path;
   err = main(argc, argv);
   close_temp_sink(sink_path, fd);
+  if (argv) free(argv);
   return err;
 }