More -Werror=format-nonliteral fixes

This fixes the build with CLang.

https://bugzilla.gnome.org/show_bug.cgi?id=702516
This commit is contained in:
John Ralls
2013-09-28 16:44:32 -07:00
committed by Colin Walters
parent 38d1658b87
commit 09d83640a8
5 changed files with 18 additions and 3 deletions

View File

@@ -2428,8 +2428,11 @@ g_markup_vprintf_escaped (const gchar *format,
/* Use them to format the arguments
*/
G_VA_COPY (args2, args);
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
output1 = g_strdup_vprintf (format1->str, args);
if (!output1)
{
va_end (args2);
@@ -2440,7 +2443,7 @@ g_markup_vprintf_escaped (const gchar *format,
va_end (args2);
if (!output2)
goto cleanup;
#pragma GCC diagnostic pop
result = g_string_new (NULL);
/* Iterate through the original format string again,