#include <lttng/tracef.h>
+__attribute__((format(printf, 1, 2)))
void print_debug(const char* msg, ...)
{
va_list ap;
#include <lttng/tracelog.h>
+__attribute__((format(printf, 1, 2)))
void print_err(const char* msg, ...)
{
va_list ap;
#endif
extern
+__attribute__((format(printf, 1, 2)))
void _lttng_ust_tracef(const char *fmt, ...);
extern
+__attribute__((format(printf, 1, 0)))
void _lttng_ust_vtracef(const char *fmt, va_list ap);
#define tracef(fmt, ...) \
#endif
#define TP_TRACELOG_CB_TEMPLATE(level) \
+ __attribute__ ((format(printf, 4, 5))) \
extern void _lttng_ust_tracelog_##level(const char *file, \
int line, const char *func, const char *fmt, ...); \
+ __attribute__ ((format(printf, 4, 0))) \
extern void _lttng_ust_vtracelog_##level(const char *file, \
int line, const char *func, const char *fmt, va_list ap);
#define TRACEPOINT_DEFINE
#include "lttng-ust-tracef-provider.h"
-static inline __attribute__((always_inline))
+static inline __attribute__((always_inline, format(printf, 1, 0)))
void __lttng_ust_vtracef(const char *fmt, va_list ap)
{
char *msg;
return;
}
+__attribute__((format(printf, 1, 0)))
+void _lttng_ust_vtracef(const char *fmt, va_list ap);
void _lttng_ust_vtracef(const char *fmt, va_list ap)
{
__lttng_ust_vtracef(fmt, ap);
}
+__attribute__((format(printf, 1, 2)))
+void _lttng_ust_tracef(const char *fmt, ...);
void _lttng_ust_tracef(const char *fmt, ...)
{
va_list ap;
#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) \
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) \
__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, ...) \