mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-09 14:40:54 +00:00
libsysprof-capture: Use SYSPROF_PRINTF rather than G_GNUC_PRINTF
It does the same thing for modern compilers. Signed-off-by: Philip Withnall <withnall@endlessm.com> Helps: #40
This commit is contained in:
@ -85,6 +85,6 @@ SYSPROF_AVAILABLE_IN_3_38
|
|||||||
void sysprof_collector_log_printf (int severity,
|
void sysprof_collector_log_printf (int severity,
|
||||||
const char *domain,
|
const char *domain,
|
||||||
const char *format,
|
const char *format,
|
||||||
...) G_GNUC_PRINTF (3, 4);
|
...) SYSPROF_PRINTF (3, 4);
|
||||||
|
|
||||||
SYSPROF_END_DECLS
|
SYSPROF_END_DECLS
|
||||||
|
|||||||
@ -80,3 +80,9 @@
|
|||||||
#define SYSPROF_LIKELY(expr) (expr)
|
#define SYSPROF_LIKELY(expr) (expr)
|
||||||
#define SYSPROF_UNLIKELY(expr) (expr)
|
#define SYSPROF_UNLIKELY(expr) (expr)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
|
#define SYSPROF_PRINTF(format_idx, arg_idx) __attribute__((format(printf, format_idx, arg_idx)))
|
||||||
|
#else
|
||||||
|
#define SYSPROF_PRINTF(format_idx, arg_idx)
|
||||||
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user