Fix warning on clang and old gcc

This commit is contained in:
Patrick Pelissier committed 2021-01-18 18:21:01 +01:00
1 parent c625c39883
commit 8597b0b8c0
1 file changed
+1 -1
+1 -1
View File
@@ -627,7 +627,7 @@ static void test_M_CSTR(void)
_Pragma("GCC diagnostic ignored \"-Wformat-truncation\"")
#endif
r = strcmp(M_CSTR("Hello %s %c", "World", '!'), "Hello W");
#ifdef __GNUC__
#if defined(__GNUC__) && __GNUC__ >= 7 && !defined(__clang__)
_Pragma("GCC diagnostic pop")
#endif
assert (r == 0);