summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Jones <pjones@redhat.com>2021-08-04 11:06:09 -0400
committerPeter Jones <pjones@redhat.com>2021-09-07 17:05:04 -0400
commit3f7050da2b5fa0548394c6f88cff14d2df00ff34 (patch)
tree26df8101741f818c0d80c31e4acc916158d7d9b3
parent588e2dd8174cc7a114d716a31211de4051c6c699 (diff)
downloadefi-boot-shim-3f7050da2b5fa0548394c6f88cff14d2df00ff34.tar.gz
efi-boot-shim-3f7050da2b5fa0548394c6f88cff14d2df00ff34.zip
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 <pjones@redhat.com>
-rw-r--r--test-str.c2
1 files changed, 1 insertions, 1 deletions
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