aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2011-05-11 13:24:50 -0600
committerEric Blake <eblake@redhat.com>2011-05-11 13:28:50 -0600
commitbc6bfeaa1769811635ef1384eecebda68dee9522 (patch)
treeb15308eefb283358ba7f7c3c787f4a503aa6c935 /examples
parentlibvirt,logging: cleanup VIR_XXX0() (diff)
downloadlibvirt-bc6bfeaa1769811635ef1384eecebda68dee9522.tar.gz
libvirt-bc6bfeaa1769811635ef1384eecebda68dee9522.tar.bz2
libvirt-bc6bfeaa1769811635ef1384eecebda68dee9522.zip
build: avoid gcc preprocessor extensions
Use of ',##__VA_ARGS__' is a gcc extension not guaranteed by C99; thankfully, we can avoid it by lumping the format argument into the var-args set. * src/util/logging.h (VIR_DEBUG_INT, VIR_INFO_INT, VIR_WARN_INT) (VIR_ERROR_INT, VIR_DEBUG, VIR_INFO, VIR_WARN, VIR_ERROR): Stick to C99 var-arg macro syntax. * examples/domain-events/events-c/event-test.c (VIR_DEBUG): Simplify.
Diffstat (limited to 'examples')
-rw-r--r--examples/domain-events/events-c/event-test.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/examples/domain-events/events-c/event-test.c b/examples/domain-events/events-c/event-test.c
index 52ec5d01d..2da58b8f0 100644
--- a/examples/domain-events/events-c/event-test.c
+++ b/examples/domain-events/events-c/event-test.c
@@ -8,8 +8,7 @@
#include <libvirt/libvirt.h>
#include <libvirt/virterror.h>
-#define VIR_DEBUG(fmt, ...) printf("%s:%d: " fmt "\n", \
- __func__, __LINE__, ##__VA_ARGS__)
+#define VIR_DEBUG(fmt) printf("%s:%d: " fmt "\n", __func__, __LINE__)
#define STREQ(a,b) (strcmp(a,b) == 0)
#ifndef ATTRIBUTE_UNUSED