From: David Zeuthen Date: Sat, 7 Jul 2012 21:34:20 +0000 (-0400) Subject: Disable -Wformat-nonliteral for a tiny block of code X-Git-Tag: upstream/2.1.2~182 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b519b97a19060027cd8e1fc1e663dbc61f21f4e4;p=platform%2Fupstream%2Fudisks2.git Disable -Wformat-nonliteral for a tiny block of code ... in this case, we happen to know better than the compiler what we are doing. Signed-off-by: David Zeuthen --- diff --git a/udisks/udisksclient.c b/udisks/udisksclient.c index 3fe9133..065a59a 100644 --- a/udisks/udisksclient.c +++ b/udisks/udisksclient.c @@ -2215,11 +2215,15 @@ udisks_client_get_id_for_display (UDisksClient *client, else if ((g_strcmp0 (id_type[n].version, version) == 0 && strlen (version) > 0) || (g_strcmp0 (id_type[n].version, "*") == 0 && strlen (version) > 0)) { + /* we know better than the compiler here */ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wformat-nonliteral" if (long_string) ret = g_strdup_printf (g_dpgettext2 (GETTEXT_PACKAGE, "fs-type", id_type[n].long_name), version); else ret = g_strdup_printf (g_dpgettext2 (GETTEXT_PACKAGE, "fs-type", id_type[n].short_name), version); goto out; +#pragma GCC diagnostic pop } } }