Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 1 | From de13d1f908335cc882c447e4d7c4360b9e5da190 Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Thu, 6 Sep 2018 17:49:44 -0700 |
| 4 | Subject: [PATCH] fix non-literal format string issues |
| 5 | |
| 6 | clang errors out when using -Werror=format-nonliteral |
| 7 | since the definition of g_strdup_vprintf() from glib-2.0 |
| 8 | is using va_list and clangs still warns where as |
| 9 | gcc doesn't do that for va_list arguments |
| 10 | |
| 11 | Fixes |
| 12 | src/sp-window.c:96:27: error: format string is not a string literal [-Werror,-Wformat-nonliteral] |
| 13 | | str = g_strdup_vprintf (format, args); |
| 14 | | ^~~~~~ |
| 15 | |
| 16 | Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/sysprof/merge_requests/6] |
| 17 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 18 | --- |
| 19 | src/sp-window.c | 2 +- |
| 20 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 21 | |
| 22 | diff --git a/src/sp-window.c b/src/sp-window.c |
| 23 | index 4dfac2d..aff4779 100644 |
| 24 | --- a/src/sp-window.c |
| 25 | +++ b/src/sp-window.c |
| 26 | @@ -80,7 +80,7 @@ static guint signals [N_SIGNALS]; |
| 27 | static void sp_window_set_profiler (SpWindow *self, |
| 28 | SpProfiler *profiler); |
| 29 | |
| 30 | -static void |
| 31 | +static G_GNUC_PRINTF(3, 4) void |
| 32 | sp_window_notify_user (SpWindow *self, |
| 33 | GtkMessageType message_type, |
| 34 | const gchar *format, |