gtrace: Add G_GNUC_PRINTF annotation

This allows compilers to check the format placeholders properly. It
fixes compilation on clang, which gives a warning about untrusted
strings being passed on to subsequent functions which require format
placeholders.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
Philip Withnall 2020-10-23 12:07:02 +01:00
parent b67185cd92
commit 30782c4c3c

View File

@ -54,7 +54,7 @@ void (g_trace_mark) (gint64 begin_time_nsec,
const gchar *group,
const gchar *name,
const gchar *message_format,
...);
...) G_GNUC_PRINTF (5, 6);
#ifndef HAVE_SYSPROF
/* Optimise the whole call out */