1
0
mirror of https://passt.top/passt synced 2024-12-22 05:35:23 +00:00

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>
This commit is contained in:
Stefano Brivio 2022-10-12 17:31:37 +02:00
parent 55cdcc159b
commit 7f2a7396e2

4
log.h
View File

@ -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);