Commit 8cdbc7fb authored by coypoop's avatar coypoop Committed by Colin Walters
Browse files

gdate: Move warning pragma outside of function

Commit 0817af40 breaks the build on
older versions of GCC, which don't allow pragma inside functions.
parent 74b1dd87
......@@ -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"
g_date_strftime (gchar *s,
gsize slen,
......@@ -2494,10 +2497,7 @@ g_date_strftime (gchar *s,
* recognize whether strftime actually failed or just returned "".
tmpbuf[0] = '\1';
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
tmplen = strftime (tmpbuf, tmpbufsize, locale_format, &tm);
#pragma GCC diagnostic pop
if (tmplen == 0 && tmpbuf[0] != '\0')
......@@ -2552,3 +2552,5 @@ g_date_strftime (gchar *s,
return retval;
#pragma GCC diagnostic pop
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment