From 848a53438529777051eac0ecf55edb2d2c96f3be Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Fri, 23 Oct 2020 12:07:02 +0100 Subject: [PATCH] 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 --- glib/gtrace-private.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glib/gtrace-private.h b/glib/gtrace-private.h index 24550152d..78bf04af4 100644 --- a/glib/gtrace-private.h +++ b/glib/gtrace-private.h @@ -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 */