summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/gettext
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2017-02-20 00:46:35 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-02-23 12:49:51 -0800
commit1e01b6102960db762661cff28af68015628801ea (patch)
treeacc232fc16f330b1883480bc1523f61b14a4e545 /meta/recipes-core/gettext
parentf35aa16f37d8fc1ef7a154b23ae5f5f3e006a88a (diff)
downloadpoky-1e01b6102960db762661cff28af68015628801ea.tar.gz
gettext: fix formatting issues
Fixed when compile with "-Wformat -Wformat-security -Werror=format-security": | gettext-tools/gnulib-lib/libcroco/cr-statement.c: In function 'cr_statement_dump_charset': | gettext-tools/gnulib-lib/libcroco/cr-statement.c:2661:17: error: format not a string literal and no format arguments [-Werror=format-security] | fprintf (a_fp, str) ; And: gettext-tools/gnulib-lib/libxml/timsort.h:326:80: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'unsigned int' [-Wformat=] fprintf(stderr, "Error allocating temporary storage for tim sort: need %lu bytes", sizeof(SORT_TYPE) * new_size); [YOCTO #9544] (From OE-Core rev: 41eb2da1b05515e3803a331686fa6ca763ae2e69) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/gettext')
-rw-r--r--meta/recipes-core/gettext/gettext-0.19.8.1/cr-statement.c-timsort.h-fix-formatting-issues.patch87
-rw-r--r--meta/recipes-core/gettext/gettext_0.19.8.1.bb1
2 files changed, 88 insertions, 0 deletions
diff --git a/meta/recipes-core/gettext/gettext-0.19.8.1/cr-statement.c-timsort.h-fix-formatting-issues.patch b/meta/recipes-core/gettext/gettext-0.19.8.1/cr-statement.c-timsort.h-fix-formatting-issues.patch
new file mode 100644
index 0000000000..6af1604198
--- /dev/null
+++ b/meta/recipes-core/gettext/gettext-0.19.8.1/cr-statement.c-timsort.h-fix-formatting-issues.patch
@@ -0,0 +1,87 @@
1From e546de65a333789e83f5485757967cee29ee3681 Mon Sep 17 00:00:00 2001
2From: Robert Yang <liezhi.yang@windriver.com>
3Date: Sun, 19 Feb 2017 23:32:46 -0800
4Subject: [PATCH] cr-statement.c/timsort.h: fix formatting issues
5
6Fixed when compile with "-Wformat -Wformat-security -Werror=format-security":
7| gettext-tools/gnulib-lib/libcroco/cr-statement.c: In function 'cr_statement_dump_charset':
8| gettext-tools/gnulib-lib/libcroco/cr-statement.c:2661:17: error: format not a string literal and no format arguments [-Werror=format-security]
9| fprintf (a_fp, str) ;
10
11And:
12gettext-tools/gnulib-lib/libxml/timsort.h:326:80: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'unsigned int' [-Wformat=]
13 fprintf(stderr, "Error allocating temporary storage for tim sort: need %lu bytes", sizeof(SORT_TYPE) * new_size);
14
15Upstream-Status: Pending
16
17Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
18---
19 gettext-tools/gnulib-lib/libcroco/cr-statement.c | 10 +++++-----
20 gettext-tools/gnulib-lib/libxml/timsort.h | 2 +-
21 2 files changed, 6 insertions(+), 6 deletions(-)
22
23diff --git a/gettext-tools/gnulib-lib/libcroco/cr-statement.c b/gettext-tools/gnulib-lib/libcroco/cr-statement.c
24index 617520f..100104b 100644
25--- a/gettext-tools/gnulib-lib/libcroco/cr-statement.c
26+++ b/gettext-tools/gnulib-lib/libcroco/cr-statement.c
27@@ -2607,7 +2607,7 @@ cr_statement_dump_ruleset (CRStatement * a_this, FILE * a_fp, glong a_indent)
28 g_return_if_fail (a_fp && a_this);
29 str = cr_statement_ruleset_to_string (a_this, a_indent);
30 if (str) {
31- fprintf (a_fp, str);
32+ fprintf (a_fp, "%s", str);
33 g_free (str);
34 str = NULL;
35 }
36@@ -2658,7 +2658,7 @@ cr_statement_dump_charset (CRStatement * a_this, FILE * a_fp, gulong a_indent)
37 str = cr_statement_charset_to_string (a_this,
38 a_indent) ;
39 if (str) {
40- fprintf (a_fp, str) ;
41+ fprintf (a_fp, "%s", str) ;
42 g_free (str) ;
43 str = NULL ;
44 }
45@@ -2685,7 +2685,7 @@ cr_statement_dump_page (CRStatement * a_this, FILE * a_fp, gulong a_indent)
46
47 str = cr_statement_at_page_rule_to_string (a_this, a_indent) ;
48 if (str) {
49- fprintf (a_fp, str);
50+ fprintf (a_fp, "%s", str);
51 g_free (str) ;
52 str = NULL ;
53 }
54@@ -2711,7 +2711,7 @@ cr_statement_dump_media_rule (CRStatement * a_this,
55
56 str = cr_statement_media_rule_to_string (a_this, a_indent) ;
57 if (str) {
58- fprintf (a_fp, str) ;
59+ fprintf (a_fp, "%s", str) ;
60 g_free (str) ;
61 str = NULL ;
62 }
63@@ -2737,7 +2737,7 @@ cr_statement_dump_import_rule (CRStatement * a_this, FILE * a_fp,
64
65 str = cr_statement_import_rule_to_string (a_this, a_indent) ;
66 if (str) {
67- fprintf (a_fp, str) ;
68+ fprintf (a_fp, "%s", str) ;
69 g_free (str) ;
70 str = NULL ;
71 }
72diff --git a/gettext-tools/gnulib-lib/libxml/timsort.h b/gettext-tools/gnulib-lib/libxml/timsort.h
73index 795f272..443918a 100644
74--- a/gettext-tools/gnulib-lib/libxml/timsort.h
75+++ b/gettext-tools/gnulib-lib/libxml/timsort.h
76@@ -323,7 +323,7 @@ static void TIM_SORT_RESIZE(TEMP_STORAGE_T *store, const size_t new_size)
77 SORT_TYPE *tempstore = (SORT_TYPE *)realloc(store->storage, new_size * sizeof(SORT_TYPE));
78 if (tempstore == NULL)
79 {
80- fprintf(stderr, "Error allocating temporary storage for tim sort: need %lu bytes", sizeof(SORT_TYPE) * new_size);
81+ fprintf(stderr, "Error allocating temporary storage for tim sort: need %zu bytes", sizeof(SORT_TYPE) * new_size);
82 exit(1);
83 }
84 store->storage = tempstore;
85--
862.10.2
87
diff --git a/meta/recipes-core/gettext/gettext_0.19.8.1.bb b/meta/recipes-core/gettext/gettext_0.19.8.1.bb
index 7b8c1e8eb4..557bf684e5 100644
--- a/meta/recipes-core/gettext/gettext_0.19.8.1.bb
+++ b/meta/recipes-core/gettext/gettext_0.19.8.1.bb
@@ -13,6 +13,7 @@ RCONFLICTS_${PN} = "proxy-libintl"
13SRC_URI = "${GNU_MIRROR}/gettext/gettext-${PV}.tar.gz \ 13SRC_URI = "${GNU_MIRROR}/gettext/gettext-${PV}.tar.gz \
14 file://parallel.patch \ 14 file://parallel.patch \
15 file://add-with-bisonlocaledir.patch \ 15 file://add-with-bisonlocaledir.patch \
16 file://cr-statement.c-timsort.h-fix-formatting-issues.patch \
16" 17"
17 18
18SRC_URI[md5sum] = "97e034cf8ce5ba73a28ff6c3c0638092" 19SRC_URI[md5sum] = "97e034cf8ce5ba73a28ff6c3c0638092"