gdate: Suppress string format literal warning

Newer versions of GCC emit an error here, but we know it's safe.
https://bugzilla.gnome.org/761550
This commit is contained in:
coypu 2016-02-08 00:06:06 +02:00 committed by Colin Walters
parent ac84fbfca3
commit 0817af40e8

View File

@ -2494,7 +2494,10 @@ 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')
{