From: Marek Schimara Date: Thu, 1 Sep 2016 08:42:32 +0000 (+0200) Subject: src/optparse.c: fix gcc warning "ISO C does not permit named variadic macros" X-Git-Tag: v1.7.0~35^2~21 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=42ee9f785059e6552c9a470f467c55e343e21f51;p=thirdparty%2Frrdtool-1.x.git src/optparse.c: fix gcc warning "ISO C does not permit named variadic macros" optparse.c:4:39: warning: ISO C does not permit named variadic macros [-Wvariadic-macros] #define opterror(options, format, args...) \ ^ --- diff --git a/src/optparse.c b/src/optparse.c index 0460cb66..35391648 100644 --- a/src/optparse.c +++ b/src/optparse.c @@ -1,8 +1,8 @@ #include #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)