diff options
author | Khem Raj <raj.khem@gmail.com> | 2016-07-14 18:49:36 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-07-27 08:33:38 +0100 |
commit | b3acdca9b67ce6bbe5fc07f409aee6f6915060bb (patch) | |
tree | e9332058566d6ea10bbf02d635cd5116a73b9896 /meta/recipes-core/glib-2.0/glib-2.0/ignore-format-nonliteral-warning.patch | |
parent | 7204ed57eda52f2e765191d488b6e1a7b7c65b15 (diff) | |
download | poky-b3acdca9b67ce6bbe5fc07f409aee6f6915060bb.tar.gz |
glib-2.0: Ignore useless warning found with gcc-6
../../glib-2.46.2/glib/gdate.c:2497:7: error: format not a string literal, format string not checked [-Werror=format-nonliteral]
tmplen = strftime (tmpbuf, tmpbufsize, locale_format, &tm);
^~~~~~
| ../../../../../../../../workspace/sources/glib-2.0/glib/tests/gdatetime.c: In function 'test_strftime':
| ../../../../../../../../workspace/sources/glib-2.0/glib/tests/gdatetime.c:1338:3: error: '%c' yields only last 2 digits of year in some locales [-Werror=format-y2k]
| "a%a A%A b%b B%B c%c C%C d%d e%e F%F g%g G%G h%h H%H I%I j%j m%m M%M " \
Additionally fix the problem seen where write() return code is ignored
(From OE-Core rev: 3fdecff96dd7516605ec9248b2a39de4db81306f)
(From OE-Core rev: 76271b5710e8d02d4ca0559cbf72c149f9beb4e2)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/glib-2.0/glib-2.0/ignore-format-nonliteral-warning.patch')
-rw-r--r-- | meta/recipes-core/glib-2.0/glib-2.0/ignore-format-nonliteral-warning.patch | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/ignore-format-nonliteral-warning.patch b/meta/recipes-core/glib-2.0/glib-2.0/ignore-format-nonliteral-warning.patch new file mode 100644 index 0000000000..d533975100 --- /dev/null +++ b/meta/recipes-core/glib-2.0/glib-2.0/ignore-format-nonliteral-warning.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | From 8cdbc7fb2c8c876902e457abe46ee18a0b134486 Mon Sep 17 00:00:00 2001 | ||
2 | From: coypu <coypu@sdf.org> | ||
3 | Date: Wed, 2 Mar 2016 19:38:48 +0200 | ||
4 | Subject: gdate: Move warning pragma outside of function | ||
5 | |||
6 | Commit 0817af40e8c74c721c30f6ef482b1f53d12044c7 breaks the build on | ||
7 | older versions of GCC, which don't allow pragma inside functions. | ||
8 | |||
9 | https://bugzilla.gnome.org/761550 | ||
10 | --- | ||
11 | Upstream-Status: Backport | ||
12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
13 | |||
14 | glib/gdate.c | 8 +++++--- | ||
15 | 1 file changed, 5 insertions(+), 3 deletions(-) | ||
16 | |||
17 | diff --git a/glib/gdate.c b/glib/gdate.c | ||
18 | index cdc735c..92c34d2 100644 | ||
19 | --- a/glib/gdate.c | ||
20 | +++ b/glib/gdate.c | ||
21 | @@ -2439,6 +2439,9 @@ win32_strftime_helper (const GDate *d, | ||
22 | * | ||
23 | * Returns: number of characters written to the buffer, or 0 the buffer was too small | ||
24 | */ | ||
25 | +#pragma GCC diagnostic push | ||
26 | +#pragma GCC diagnostic ignored "-Wformat-nonliteral" | ||
27 | + | ||
28 | gsize | ||
29 | g_date_strftime (gchar *s, | ||
30 | gsize slen, | ||
31 | @@ -2552,3 +2552,5 @@ g_date_strftime (gchar *s, | ||
32 | return retval; | ||
33 | #endif | ||
34 | } | ||
35 | + | ||
36 | +#pragma GCC diagnostic pop | ||
37 | -- | ||
38 | cgit v0.12 | ||
39 | |||