From: Paul Eggert <eggert@cs.ucla.edu>
To: bug-gnulib@gnu.org
Cc: Paul Eggert <eggert@cs.ucla.edu>
Subject: [PATCH 2/2] memrchr-tests: pacify GCC
Date: Sat, 17 Jul 2021 23:56:21 -0500 [thread overview]
Message-ID: <20210718045621.1058412-2-eggert@cs.ucla.edu> (raw)
In-Reply-To: <20210718045621.1058412-1-eggert@cs.ucla.edu>
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
next prev parent reply other threads:[~2021-07-18 4:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-18 4:56 [PATCH 1/2] explicit_bzero-tests: pacify GCC Paul Eggert
2021-07-18 4:56 ` Paul Eggert [this message]
2021-07-18 9:12 ` Bruno Haible
2021-07-18 19:14 ` Paul Eggert
2021-07-18 22:23 ` Bruno Haible
2021-07-18 23:17 ` Paul Eggert
2021-07-19 0:37 ` Bruno Haible
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210718045621.1058412-2-eggert@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=bug-gnulib@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).