What does this GCC warning mean?
cpfs.c:232:33: warning: ISO C99 requires rest arguments to be used
The relevant lines are:
__attribute__((format(printf, 2, 3)))
static void cpfs_log(log_t level, char const *fmt, ...);
#define log_debug(fmt, ...) cpfs_log(DEBUG, fmt, ##__VA_ARGS__)
log_debug("Resetting bitmap");
The last line being line 232 inside a function implementation. The compiler flags are:
-g -Wall -std=gnu99 -Wfloat-equal -Wuninitialized -Winit-self -pedantic
Yes it means that you have to pass at least two arguments the way that you defined it. You could just do
#define log_debug(...) cpfs_log(DEBUG, __VA_ARGS__)
and then you'd also avoid the gcc extension of the , ##
construct.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With