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
6 Commit 0817af40e8c74c721c30f6ef482b1f53d12044c7 breaks the build on
7 older versions of GCC, which don't allow pragma inside functions.
9 https://bugzilla.gnome.org/761550
11 glib/gdate.c | 8 +++++---
12 1 file changed, 5 insertions(+), 3 deletions(-)
14 diff --git a/glib/gdate.c b/glib/gdate.c
15 index cdc735c..92c34d2 100644
18 @@ -2439,6 +2439,9 @@ win32_strftime_helper (const GDate *d,
20 * Returns: number of characters written to the buffer, or 0 the buffer was too small
22 +#pragma GCC diagnostic push
23 +#pragma GCC diagnostic ignored "-Wformat-nonliteral"
26 g_date_strftime (gchar *s,
28 @@ -2494,10 +2497,7 @@ g_date_strftime (gchar *s,
29 * recognize whether strftime actually failed or just returned "".
32 - #pragma GCC diagnostic push
33 - #pragma GCC diagnostic ignored "-Wformat-nonliteral"
34 tmplen = strftime (tmpbuf, tmpbufsize, locale_format, &tm);
35 - #pragma GCC diagnostic pop
37 if (tmplen == 0 && tmpbuf[0] != '\0')
39 @@ -2552,3 +2552,5 @@ g_date_strftime (gchar *s,
44 +#pragma GCC diagnostic pop