From 3f7050da2b5fa0548394c6f88cff14d2df00ff34 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Wed, 4 Aug 2021 11:06:09 -0400 Subject: Ignore a gcc issue in test-str.c In 33db42def2ce, we switched a gcc bounds checking error in test-str.c to be a warning, due to it being obviously wrong and only occurring with some GCC optimization flags. For more details see the comment in test-str.c . It continues to be an issue, and the warning makes the -fanalyzer and similar tools even harder to read, so it's better to just turn it off. This is only in the test data, so if something really goes wrong we should see it in failures or in valgrind when running tests. Signed-off-by: Peter Jones --- test-str.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-str.c b/test-str.c index 70d1637c..9cb831de 100644 --- a/test-str.c +++ b/test-str.c @@ -1067,7 +1067,7 @@ test_strcat(void) * I don't know. */ #pragma GCC diagnostic push -#pragma GCC diagnostic warning "-Warray-bounds" +#pragma GCC diagnostic ignored "-Warray-bounds" assert_zero_return(strncmp(s1, s0, sizeof(s)-1), 0, -1, "\n"); assert_negative_return(memcmp(s1, s0, sizeof(s)), 0, -1, "\n"); #pragma GCC diagnostic pop -- cgit v1.2.3