[oe-commits] [meta-openembedded] 77/77: evince: Fix build with clang

git at git.openembedded.org git at git.openembedded.org
Mon Sep 10 05:09:27 UTC 2018


This is an automated email from the git hooks/post-receive script.

khem pushed a commit to branch master-next
in repository meta-openembedded.

commit 8705570331c3ac5af2e36bdb6f8db3c2bea1f5b5
Author: Khem Raj <raj.khem at gmail.com>
AuthorDate: Sun Sep 9 21:59:14 2018 -0700

    evince: Fix build with clang
    
    The added patch aids clang to avoid format warnings
    
    Signed-off-by: Khem Raj <raj.khem at gmail.com>
    Cc: Andreas Müller <schnitzeltony at googlemail.com>
---
 .../0001-add-a-formatting-attribute-check.patch    | 34 ++++++++++++++++++++++
 meta-gnome/recipes-gnome/evince/evince_3.28.2.bb   |  1 +
 2 files changed, 35 insertions(+)

diff --git a/meta-gnome/recipes-gnome/evince/evince/0001-add-a-formatting-attribute-check.patch b/meta-gnome/recipes-gnome/evince/evince/0001-add-a-formatting-attribute-check.patch
new file mode 100644
index 0000000..e87da90
--- /dev/null
+++ b/meta-gnome/recipes-gnome/evince/evince/0001-add-a-formatting-attribute-check.patch
@@ -0,0 +1,34 @@
+From ef170dda7fbab53682c9bc287dec93fa86130bc9 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem at gmail.com>
+Date: Sun, 9 Sep 2018 21:49:59 -0700
+Subject: [PATCH] add a formatting attribute check
+
+Tell Clang that parameter is a printf style format using the
+attribute flag
+
+This helps in avoiding below warnings seen with clang
+
+unarr.c:106:22: error: format string is not a string literal
+[-Werror,-Wformat-nonliteral]
+|     vfprintf(stderr, msg, args);
+|                      ^~~
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem at gmail.com>
+---
+ cut-n-paste/unarr/common/unarr.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cut-n-paste/unarr/common/unarr.c b/cut-n-paste/unarr/common/unarr.c
+index 97ec92a..9e6e3ad 100644
+--- a/cut-n-paste/unarr/common/unarr.c
++++ b/cut-n-paste/unarr/common/unarr.c
+@@ -92,7 +92,7 @@ size_t ar_get_global_comment(ar_archive *ar, void *buffer, size_t count)
+     return ar->get_comment(ar, buffer, count);
+ }
+ 
+-void ar_log(const char *prefix, const char *file, int line, const char *msg, ...)
++void __attribute__((__format__ (__printf__, 4, 0))) ar_log(const char *prefix, const char *file, int line, const char *msg, ...)
+ {
+     va_list args;
+     va_start(args, msg);
diff --git a/meta-gnome/recipes-gnome/evince/evince_3.28.2.bb b/meta-gnome/recipes-gnome/evince/evince_3.28.2.bb
index c5b5484..8bf8a04 100644
--- a/meta-gnome/recipes-gnome/evince/evince_3.28.2.bb
+++ b/meta-gnome/recipes-gnome/evince/evince_3.28.2.bb
@@ -11,6 +11,7 @@ REQUIRED_DISTRO_FEATURES = "x11"
 SRC_URI = "${GNOME_MIRROR}/${GNOMEBN}/${@gnome_verdir("${PV}")}/${GNOMEBN}-${PV}.tar.${GNOME_COMPRESS_TYPE};name=archive \
            file://0001-help-remove-YELP-macro.patch \
            file://0001-Add-format-attribute-to-_synctex_malloc.patch \
+           file://0001-add-a-formatting-attribute-check.patch \
            "
 SRC_URI[archive.md5sum] = "66aa1766eaaa37536e48def11a0e67a3"
 SRC_URI[archive.sha256sum] = "0955d22d85c9f6d322b6cbb464f1cc4c352db619017ec95dad4cc5c3440f73e1"

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list