public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
* [PATCH] log.h: Avoid unnecessary GNU extension for token pasting
@ 2022-10-12 15:45 Stefano Brivio
  2022-10-13  1:13 ` David Gibson
  0 siblings, 1 reply; 2+ messages in thread
From: Stefano Brivio @ 2022-10-12 15:45 UTC (permalink / raw)
  To: passt-dev

clang says:

  ./log.h:23:18: warning: token pasting of ',' and __VA_ARGS__ is a GNU extension [-Wgnu-zero-variadic-macro-arguments]

...but we don't actually need token pasting there.

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
---
 log.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/log.h b/log.h
index f92394c..5abbfc5 100644
--- a/log.h
+++ b/log.h
@@ -20,7 +20,7 @@ void trace_init(int enable);
 #define trace(format, ...)						\
 	do {								\
 		if (log_trace)						\
-			debug(format, ##__VA_ARGS__);			\
+			debug(format, __VA_ARGS__);			\
 	} while (0)
 
 void __openlog(const char *ident, int option, int facility);
-- 
@@ -20,7 +20,7 @@ void trace_init(int enable);
 #define trace(format, ...)						\
 	do {								\
 		if (log_trace)						\
-			debug(format, ##__VA_ARGS__);			\
+			debug(format, __VA_ARGS__);			\
 	} while (0)
 
 void __openlog(const char *ident, int option, int facility);
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-10-13  4:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-12 15:45 [PATCH] log.h: Avoid unnecessary GNU extension for token pasting Stefano Brivio
2022-10-13  1:13 ` David Gibson

Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).