aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glib-2.0/glib-2.0/ignore-format-nonliteral-warning.patch
blob: d533975100b9a0202d5b2978f51f8ade22d75cac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
From 8cdbc7fb2c8c876902e457abe46ee18a0b134486 Mon Sep 17 00:00:00 2001
From: coypu <coypu@sdf.org>
Date: Wed, 2 Mar 2016 19:38:48 +0200
Subject: gdate: Move warning pragma outside of function

Commit 0817af40e8c74c721c30f6ef482b1f53d12044c7 breaks the build on
older versions of GCC, which don't allow pragma inside functions.

https://bugzilla.gnome.org/761550
---
Upstream-Status: Backport
Signed-off-by: Khem Raj <raj.khem@gmail.com>

 glib/gdate.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/glib/gdate.c b/glib/gdate.c
index cdc735c..92c34d2 100644
--- a/glib/gdate.c
+++ b/glib/gdate.c
@@ -2439,6 +2439,9 @@ win32_strftime_helper (const GDate     *d,
  *
  * Returns: number of characters written to the buffer, or 0 the buffer was too small
  */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
+
 gsize     
 g_date_strftime (gchar       *s, 
                  gsize        slen, 
@@ -2552,3 +2552,5 @@ g_date_strftime (gchar       *s,
   return retval;
 #endif
 }
+
+#pragma GCC diagnostic pop
-- 
cgit v0.12