diff options
author | Khem Raj <raj.khem@gmail.com> | 2018-09-07 09:03:53 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-09-11 09:05:29 +0100 |
commit | f179c402f46a3d3c42760d66d6a20c9e0b93f50d (patch) | |
tree | f3db13cbfb745c0b99848e7bd08ac7e93013e7d4 | |
parent | 4ff2282a7dc421c3ea6578c73fbbba768eeed146 (diff) | |
download | openembedded-core-f179c402f46a3d3c42760d66d6a20c9e0b93f50d.tar.gz openembedded-core-f179c402f46a3d3c42760d66d6a20c9e0b93f50d.tar.bz2 openembedded-core-f179c402f46a3d3c42760d66d6a20c9e0b93f50d.zip |
sysprof: Fix build with clang
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
-rw-r--r-- | meta/recipes-kernel/sysprof/files/0001-fix-non-literal-format-string-issues.patch | 34 | ||||
-rw-r--r-- | meta/recipes-kernel/sysprof/sysprof_3.30.0.bb | 1 |
2 files changed, 35 insertions, 0 deletions
diff --git a/meta/recipes-kernel/sysprof/files/0001-fix-non-literal-format-string-issues.patch b/meta/recipes-kernel/sysprof/files/0001-fix-non-literal-format-string-issues.patch new file mode 100644 index 0000000000..38f9f5f66a --- /dev/null +++ b/meta/recipes-kernel/sysprof/files/0001-fix-non-literal-format-string-issues.patch @@ -0,0 +1,34 @@ +From de13d1f908335cc882c447e4d7c4360b9e5da190 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 6 Sep 2018 17:49:44 -0700 +Subject: [PATCH] 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); +| ^~~~~~ + +Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/sysprof/merge_requests/6] +Signed-off-by: Khem Raj <raj.khem@gmail.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, diff --git a/meta/recipes-kernel/sysprof/sysprof_3.30.0.bb b/meta/recipes-kernel/sysprof/sysprof_3.30.0.bb index 7783ab27f5..19dcf25a51 100644 --- a/meta/recipes-kernel/sysprof/sysprof_3.30.0.bb +++ b/meta/recipes-kernel/sysprof/sysprof_3.30.0.bb @@ -15,6 +15,7 @@ SRC_URI += " \ file://define-NT_GNU_BUILD_ID.patch \ file://0001-Do-not-build-anything-in-help-as-it-requires-itstool.patch \ file://wordsize.patch \ + file://0001-fix-non-literal-format-string-issues.patch \ " RECIPE_NO_UPDATE_REASON = "Waiting for resolution of https://bugzilla.gnome.org/show_bug.cgi?id=794625" |