logging-internal.h: use __attribute__((format)) to check parameters
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Sat, 20 May 2017 00:32:45 +0000 (20:32 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Sun, 28 May 2017 16:57:44 +0000 (12:57 -0400)
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
include/babeltrace/logging-internal.h

index 1480a0829c12335f485d2b5e4db186bd4947fa60..ffcf1cdcf6fa3b0019a844753bc33ba180ffc9d5 100644 (file)
 #endif
 
 #if defined(__printflike)
-       #define _BT_LOG_PRINTFLIKE(a, b) __printflike(a, b)
+       #define _BT_LOG_PRINTFLIKE(str_index, first_to_check) \
+               __printflike(str_index, first_to_check)
+#elif defined(__GNUC__)
+       #define _BT_LOG_PRINTFLIKE(str_index, first_to_check) \
+               __attribute__((format(__printf__, str_index, first_to_check)))
 #else
-       #define _BT_LOG_PRINTFLIKE(a, b)
+       #define _BT_LOG_PRINTFLIKE(str_index, first_to_check)
 #endif
 
 #if (defined(_WIN32) || defined(_WIN64)) && !defined(__GNUC__)
This page took 0.024408 seconds and 4 git commands to generate.