mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 15:03:39 +02:00
Fix the -Werror=format-nonliteral fixes for older GCCs
They don't allow that pragma inside functions.
This commit is contained in:
@@ -505,6 +505,9 @@ g_resolver_record_type_to_rrtype (GResolverRecordType type)
|
||||
g_return_val_if_reached (-1);
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
|
||||
|
||||
static GList *
|
||||
g_resolver_records_from_res_query (const gchar *rrname,
|
||||
gint rrtype,
|
||||
@@ -543,10 +546,7 @@ 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;
|
||||
}
|
||||
|
||||
@@ -622,6 +622,8 @@ g_resolver_records_from_res_query (const gchar *rrname,
|
||||
return records;
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
#elif defined(G_OS_WIN32)
|
||||
|
||||
static GVariant *
|
||||
|
Reference in New Issue
Block a user