]> Savannah Git Hosting - gnulib.git/commitdiff
memrchr-tests: pacify GCC
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 18 Jul 2021 04:54:14 +0000 (23:54 -0500)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 18 Jul 2021 04:55:48 +0000 (23:55 -0500)
Pacify GCC 11.1.1 20210531 (Red Hat 11.1.1-3) x86-64.
* tests/test-memrchr.c: Disable -Wmaybe-uninitialized.

ChangeLog
tests/test-memrchr.c

index 1caabff621f4324816d87b622bb939c7900cbc61..c508084379e3e6597c5c39b809d84d5fa038be02 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2021-07-17  Paul Eggert  <eggert@cs.ucla.edu>
 
+       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.
index 24719ffb9d71c1fa12d7c1f456353d829328873d..9df55c1588a8bf326e36c9d941fb71a11f1acca5 100644 (file)
@@ -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