aboutgitcodebugslistschat
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2022-10-12 17:31:37 +0200
committerStefano Brivio <sbrivio@redhat.com>2022-10-15 02:10:36 +0200
commit7f2a7396e2abb4ea156bf9463005bbefa86f1de1 (patch)
treee6ee8490fd218b485352dc8f1fd2f6ec67e7c4bd
parent55cdcc159bee0d5a750ee43deba246a711a04ed1 (diff)
downloadpasst-7f2a7396e2abb4ea156bf9463005bbefa86f1de1.tar
passt-7f2a7396e2abb4ea156bf9463005bbefa86f1de1.tar.gz
passt-7f2a7396e2abb4ea156bf9463005bbefa86f1de1.tar.bz2
passt-7f2a7396e2abb4ea156bf9463005bbefa86f1de1.tar.lz
passt-7f2a7396e2abb4ea156bf9463005bbefa86f1de1.tar.xz
passt-7f2a7396e2abb4ea156bf9463005bbefa86f1de1.tar.zst
passt-7f2a7396e2abb4ea156bf9463005bbefa86f1de1.zip
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 <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
-rw-r--r--log.h4
1 files 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);