aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glib-2.0/glib-2.0/0002-tests-Ignore-y2k-warnings.patch
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2016-05-11 10:35:06 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-13 13:40:50 +0100
commit3fdecff96dd7516605ec9248b2a39de4db81306f (patch)
tree529617db84ba682d73a61049bbc2abc215087a58 /meta/recipes-core/glib-2.0/glib-2.0/0002-tests-Ignore-y2k-warnings.patch
parent93226e8c74be438781df79f0be5cbf563c79df8b (diff)
downloadopenembedded-core-contrib-3fdecff96dd7516605ec9248b2a39de4db81306f.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 Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/glib-2.0/glib-2.0/0002-tests-Ignore-y2k-warnings.patch')
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0002-tests-Ignore-y2k-warnings.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0002-tests-Ignore-y2k-warnings.patch b/meta/recipes-core/glib-2.0/glib-2.0/0002-tests-Ignore-y2k-warnings.patch
new file mode 100644
index 0000000000..f61fa0ae6a
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/0002-tests-Ignore-y2k-warnings.patch
@@ -0,0 +1,42 @@
+From b06b22fecc7deda8c65e28670562ca2371e4e725 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 16 Apr 2016 13:43:54 -0700
+Subject: [PATCH 2/2] tests: Ignore y2k warnings
+
+silences
+| ../../../../../../../../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 "
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted
+
+ glib/tests/gdatetime.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/glib/tests/gdatetime.c b/glib/tests/gdatetime.c
+index 16a163c..e6062fc 100644
+--- a/glib/tests/gdatetime.c
++++ b/glib/tests/gdatetime.c
+@@ -1326,6 +1326,9 @@ test_z (void)
+ g_time_zone_unref (tz);
+ }
+
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wformat-y2k"
++
+ static void
+ test_strftime (void)
+ {
+@@ -1351,6 +1354,7 @@ test_strftime (void)
+ }
+ #endif
+ }
++#pragma GCC diagnostic pop
+
+ static void
+ test_find_interval (void)
+--
+2.8.0
+