fix: add format attribute to relevant functions (-Wsuggest-attribute=format)
[lttng-ust.git] / liblttng-ust / tracelog.c
index 5dc2ffc5e16b21e4acb48ede4a2c75ab5fee61a9..1f18853ff1b49c78c4898b17f4ef30362994a005 100644 (file)
@@ -13,7 +13,7 @@
 #include "lttng-ust-tracelog-provider.h"
 
 #define TRACELOG_CB(level) \
-       static inline __attribute__((always_inline)) \
+       static inline __attribute__((always_inline, format(printf, 4, 0))) \
        void __lttng_ust_vtracelog_##level(const char *file, \
                        int line, const char *func, \
                        const char *fmt, va_list ap) \
@@ -32,6 +32,7 @@
                return; \
        } \
        \
+       __attribute__ ((format(printf, 4, 0))) \
        void _lttng_ust_vtracelog_##level(const char *file, \
                        int line, const char *func, \
                        const char *fmt, va_list ap) \
@@ -39,6 +40,7 @@
                __lttng_ust_vtracelog_##level(file, line, func, fmt, ap); \
        } \
        \
+       __attribute__ ((format(printf, 4, 5))) \
        void _lttng_ust_tracelog_##level(const char *file, \
                        int line, const char *func, \
                        const char *fmt, ...) \
This page took 0.022677 seconds and 4 git commands to generate.