[sysprof: 1/2] fix non-literal format string issues



commit fa1def2afcdc00127f2645a61c73c1c28deb33dc
Author: Khem Raj <raj khem gmail com>
Date:   Thu Sep 6 17:55:44 2018 -0700

    fix non-literal format string issues
    
    clang errors out when using -Werror=format-nonliteral
    since the definition of g_strdup_vprintf() from glib-2.0
    is using va_list and clangs still warns where as
    gcc doesn't do that for va_list arguments
    
    Fixes
    src/sp-window.c:96:27: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
    |   str = g_strdup_vprintf (format, args);
    |                           ^~~~~~
    
    Signed-off-by: Khem Raj <raj khem gmail com>
    Signed-off-by: Ross Burton <ross burton intel com>

 src/sp-window.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/sp-window.c b/src/sp-window.c
index 4dfac2d..aff4779 100644
--- a/src/sp-window.c
+++ b/src/sp-window.c
@@ -80,7 +80,7 @@ static guint signals [N_SIGNALS];
 static void sp_window_set_profiler (SpWindow   *self,
                                     SpProfiler *profiler);
 
-static void
+static G_GNUC_PRINTF(3, 4) void
 sp_window_notify_user (SpWindow       *self,
                        GtkMessageType  message_type,
                        const gchar    *format,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]