logging-internal.h: use __attribute__((format)) to check parameters
[babeltrace.git] / 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.033842 seconds and 4 git commands to generate.