From 30782c4c3c4e9d4cc9cd8a52d34527ae15dbb65f 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 */