[oe] [meta-gnome][ 31/32] gtksourceview2: Fix build with clang

Khem Raj raj.khem at gmail.com
Tue Apr 18 18:21:41 UTC 2017


Signed-off-by: Khem Raj <raj.khem at gmail.com>
---
 ...et.c-fix-non-literal-format-string-issues.patch | 31 ++++++++++++++++++++++
 .../gtksourceview/gtksourceview2_2.10.5.bb         |  3 ++-
 2 files changed, 33 insertions(+), 1 deletion(-)
 create mode 100644 meta-gnome/recipes-gnome/gtksourceview/gtksourceview2/0001-test-widget.c-fix-non-literal-format-string-issues.patch

diff --git a/meta-gnome/recipes-gnome/gtksourceview/gtksourceview2/0001-test-widget.c-fix-non-literal-format-string-issues.patch b/meta-gnome/recipes-gnome/gtksourceview/gtksourceview2/0001-test-widget.c-fix-non-literal-format-string-issues.patch
new file mode 100644
index 000000000..6118b679a
--- /dev/null
+++ b/meta-gnome/recipes-gnome/gtksourceview/gtksourceview2/0001-test-widget.c-fix-non-literal-format-string-issues.patch
@@ -0,0 +1,31 @@
+From 0781b218beb8ba160ea223ff3d74a4fa2abf86fa Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem at gmail.com>
+Date: Thu, 13 Apr 2017 16:21:14 -0700
+Subject: [PATCH] test-widget.c: 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 clang seems to still warn where as
+gcc doesn't do that for va_list arguments
+
+Signed-off-by: Khem Raj <raj.khem at gmail.com>
+---
+ tests/test-widget.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/test-widget.c b/tests/test-widget.c
+index 46f5f4e..3f2e60f 100644
+--- a/tests/test-widget.c
++++ b/tests/test-widget.c
+@@ -260,7 +260,7 @@ static const gchar *buffer_ui_description =
+ 
+ /* File loading code ----------------------------------------------------------------- */
+ 
+-static void
++static void G_GNUC_PRINTF (2, 0)
+ error_dialog (GtkWindow *parent, const gchar *msg, ...)
+ {
+ 	va_list ap;
+-- 
+2.12.2
+
diff --git a/meta-gnome/recipes-gnome/gtksourceview/gtksourceview2_2.10.5.bb b/meta-gnome/recipes-gnome/gtksourceview/gtksourceview2_2.10.5.bb
index e3bf551eb..012f8e3bc 100644
--- a/meta-gnome/recipes-gnome/gtksourceview/gtksourceview2_2.10.5.bb
+++ b/meta-gnome/recipes-gnome/gtksourceview/gtksourceview2_2.10.5.bb
@@ -18,7 +18,8 @@ REQUIRED_DISTRO_FEATURES = "x11"
 SRC_URI = "${GNOME_MIRROR}/${PNAME}/${@gnome_verdir("${PV}")}/${PNAME}-${PV}.tar.bz2;name=archive \
            file://gtk-doc.make \
            file://suppress-string-format-literal-warning.patch \
-"
+           file://0001-test-widget.c-fix-non-literal-format-string-issues.patch \
+           "
 SRC_URI[archive.md5sum] = "1219ad1694df136f126507466aeb41aa"
 SRC_URI[archive.sha256sum] = "c585773743b1df8a04b1be7f7d90eecdf22681490d6810be54c81a7ae152191e"
 
-- 
2.12.2




More information about the Openembedded-devel mailing list