summaryrefslogtreecommitdiff
path: root/tests/portable/snprintf-t.c
diff options
context:
space:
mode:
authorRuss Allbery <eagle@eyrie.org>2015-08-18 21:37:19 -0700
committerRuss Allbery <eagle@eyrie.org>2015-08-18 21:37:19 -0700
commitc3c9076ceefbcea8367ea1a60ccb043ce4f4b2ba (patch)
tree8438656c682b53a13ace037780fabd3eb818c1b5 /tests/portable/snprintf-t.c
parenta956cc648786a70c8ee8c6052b89cf95429b2c07 (diff)
parentc689b2e01e1eca4694e9d24e2e6397747708c220 (diff)
Merge tag 'upstream/3.1' into debian
Upstream version 3.1
Diffstat (limited to 'tests/portable/snprintf-t.c')
-rw-r--r--tests/portable/snprintf-t.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/portable/snprintf-t.c b/tests/portable/snprintf-t.c
index 270d2e1..cc8cf00 100644
--- a/tests/portable/snprintf-t.c
+++ b/tests/portable/snprintf-t.c
@@ -26,7 +26,9 @@
* Disable the requirement that format strings be literals. We need variable
* formats for easy testing.
*/
-#pragma GCC diagnostic ignored "-Wformat-nonliteral"
+#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 2) || defined(__clang__)
+# pragma GCC diagnostic ignored "-Wformat-nonliteral"
+#endif
/*
* Intentionally don't add the printf attribute here since we pass a