]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
src/optparse.c: fix gcc warning "ISO C does not permit named variadic macros"
authorMarek Schimara <Marek.Schimara@bull.net>
Thu, 1 Sep 2016 08:42:32 +0000 (10:42 +0200)
committerMarek Schimara <Marek.Schimara@bull.net>
Fri, 2 Sep 2016 13:31:38 +0000 (15:31 +0200)
optparse.c:4:39: warning: ISO C does not permit named variadic macros [-Wvariadic-macros]
  #define opterror(options, format, args...) \
                                        ^

src/optparse.c

index 0460cb6669cfd38c29036d9b2e372f2a5bce5042..35391648e2c95aab6d42f304b6f60b7a577d3c77 100644 (file)
@@ -1,8 +1,8 @@
 #include <stdio.h>
 #include "optparse.h"
 
-#define opterror(options, format, args...) \
-    snprintf(options->errmsg, sizeof(options->errmsg), format, args);
+#define opterror(options, format, ...) \
+    snprintf(options->errmsg, sizeof(options->errmsg), format, __VA_ARGS__);
 
 #define options_argv(i) \
     ((i) < options->argc ? options->argv[i] : NULL)