mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-29 21:33:30 +02:00
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:
committed by
Colin Walters
parent
38d1658b87
commit
09d83640a8
@@ -423,7 +423,9 @@ g_content_type_get_icon_internal (const gchar *type,
|
||||
G_LOCK (gio_xdgmime);
|
||||
xdg_icon = xdg_mime_get_icon (type);
|
||||
G_UNLOCK (gio_xdgmime);
|
||||
if (xdg_icon != NULL)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
|
||||
if (xdg_icon != NULL)
|
||||
xdg_mimetype_icon = g_strdup_printf (file_template, xdg_icon);
|
||||
|
||||
if (xdg_mimetype_icon)
|
||||
@@ -438,6 +440,7 @@ g_content_type_get_icon_internal (const gchar *type,
|
||||
xdg_mimetype_generic_icon = g_content_type_get_generic_icon_name (type);
|
||||
if (xdg_mimetype_generic_icon)
|
||||
generic_mimetype_icon = g_strdup_printf (file_template, xdg_mimetype_generic_icon);
|
||||
#pragma GCC diagnostic pop
|
||||
if (generic_mimetype_icon)
|
||||
icon_names[n++] = generic_mimetype_icon;
|
||||
|
||||
|
@@ -543,7 +543,10 @@ g_resolver_records_from_res_query (const gchar *rrname,
|
||||
format = _("Error resolving '%s'");
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
|
||||
g_set_error (error, G_RESOLVER_ERROR, errnum, format, rrname);
|
||||
#pragma GCC diagnostic pop
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user