From 44aad5b0afeed4ad432429404c760aeae9fd9a0a Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 17 Jul 2021 23:54:14 -0500 Subject: [PATCH] memrchr-tests: pacify GCC Pacify GCC 11.1.1 20210531 (Red Hat 11.1.1-3) x86-64. * tests/test-memrchr.c: Disable -Wmaybe-uninitialized. --- ChangeLog | 4 ++++ tests/test-memrchr.c | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index 1caabff621..c508084379 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2021-07-17 Paul Eggert + memrchr-tests: pacify GCC + Pacify GCC 11.1.1 20210531 (Red Hat 11.1.1-3) x86-64. + * tests/test-memrchr.c: Disable -Wmaybe-uninitialized. + explicit_bzero-tests: pacify GCC Redo to pacify -Wmaybe-uninitialized with GCC 11.1.1 20210531 (Red Hat 11.1.1-3) x86-64. diff --git a/tests/test-memrchr.c b/tests/test-memrchr.c index 24719ffb9d..9df55c1588 100644 --- a/tests/test-memrchr.c +++ b/tests/test-memrchr.c @@ -27,6 +27,11 @@ SIGNATURE_CHECK (memrchr, void *, (void const *, int, size_t)); #include "zerosize-ptr.h" #include "macros.h" +/* Work around GCC bug 101494. */ +#if 4 < __GNUC__ + (3 <= __GNUC_MINOR__) +# pragma GCC diagnostic ignored "-Wmaybe-uninitialized" +#endif + /* Calculating void * + int is not portable, so this wrapper converts to char * to make the tests easier to write. */ #define MEMRCHR (char *) memrchr -- 2.39.5