Remove use of args... and just use __VA_ARGS__. The macros expanding the argument pack do not require args extension to remove trailing comma.
Signed-off-by: Tyler Retzlaff <roret...@linux.microsoft.com> --- lib/cmdline/cmdline_parse.c | 2 +- lib/cmdline/cmdline_parse_num.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/cmdline/cmdline_parse.c b/lib/cmdline/cmdline_parse.c index b6d6dac..76a212d 100644 --- a/lib/cmdline/cmdline_parse.c +++ b/lib/cmdline/cmdline_parse.c @@ -16,7 +16,7 @@ #ifdef RTE_LIBRTE_CMDLINE_DEBUG #define debug_printf printf #else -#define debug_printf(args...) do {} while(0) +#define debug_printf(...) do {} while (0) #endif #define CMDLINE_BUFFER_SIZE 64 diff --git a/lib/cmdline/cmdline_parse_num.c b/lib/cmdline/cmdline_parse_num.c index 820af07..e849878 100644 --- a/lib/cmdline/cmdline_parse_num.c +++ b/lib/cmdline/cmdline_parse_num.c @@ -14,9 +14,9 @@ #include "cmdline_parse_num.h" #ifdef RTE_LIBRTE_CMDLINE_DEBUG -#define debug_printf(args...) printf(args) +#define debug_printf(...) printf(__VA_ARGS__) #else -#define debug_printf(args...) do {} while(0) +#define debug_printf(...) do {} while (0) #endif struct cmdline_token_ops cmdline_token_num_ops = { -- 1.8.3.1