0001-fix-non-literal-format-string-issues.patch 1.2 KB

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