From 7f2a7396e2abb4ea156bf9463005bbefa86f1de1 Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Wed, 12 Oct 2022 17:31:37 +0200 Subject: [PATCH] log.h: Avoid unnecessary GNU extension for token pasting clang says: ./log.h:23:18: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments] We need token pasting here just because of the 'format' in trace(): drop it. Suggested-by: David Gibson Signed-off-by: Stefano Brivio --- log.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/log.h b/log.h index f92394c..987dc17 100644 --- a/log.h +++ b/log.h @@ -17,10 +17,10 @@ void debug(const char *format, ...); extern int log_trace; void trace_init(int enable); -#define trace(format, ...) \ +#define trace(...) \ do { \ if (log_trace) \ - debug(format, ##__VA_ARGS__); \ + debug(__VA_ARGS__); \ } while (0) void __openlog(const char *ident, int option, int facility);