[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/2] memrchr-tests: pacify GCC
From: |
Paul Eggert |
Subject: |
[PATCH 2/2] memrchr-tests: pacify GCC |
Date: |
Sat, 17 Jul 2021 23:56:21 -0500 |
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 1caabff62..c50808437 100644
--- 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.
diff --git a/tests/test-memrchr.c b/tests/test-memrchr.c
index 24719ffb9..9df55c158 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.31.1