From: Samuel Thibault <samuel.thibault@ens-lyon.org>
To: libc-alpha@sourceware.org
Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>
Subject: [hurd,commited] hurd: Silence warning
Date: Wed, 04 Apr 2018 00:06:00 -0000 [thread overview]
Message-ID: <20180404000648.3145-1-samuel.thibault@ens-lyon.org> (raw)
* hurd/hurdsig.c (interrupted_reply_port_location): Use
DIAG_IGNORE_NEEDS_COMMENT to silence warning with GCC 6 and before.
---
ChangeLog | 2 ++
hurd/hurdsig.c | 8 ++++++++
2 files changed, 10 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index cc9613239d..cbe62ee88d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -37,6 +37,8 @@
* sysdeps/mach/hurd/if_index.c (__if_nametoindex): Return ENODEV if
ifname is too long.
+ * hurd/hurdsig.c (interrupted_reply_port_location): Use
+ DIAG_IGNORE_NEEDS_COMMENT to silence warning with GCC 6 and before.
2018-04-03 Wilco Dijkstra <wdijkstr@arm.com>
diff --git a/hurd/hurdsig.c b/hurd/hurdsig.c
index 31e8d336e3..6b73dcdbf3 100644
--- a/hurd/hurdsig.c
+++ b/hurd/hurdsig.c
@@ -33,6 +33,8 @@
#include "hurdmalloc.h" /* XXX */
#include "../locale/localeinfo.h"
+#include <libc-diag.h>
+
const char *_hurdsig_getenv (const char *);
struct mutex _hurd_siglock;
@@ -246,8 +248,14 @@ interrupted_reply_port_location (thread_t thread,
/* Faulted trying to read the TCB. */
return NULL;
+ DIAG_PUSH_NEEDS_COMMENT;
+ /* GCC 6 and before seem to be confused by the setjmp call inside
+ _hurdsig_catch_memory_fault and think that we may be returning a second
+ time to here with portloc uninitialized (but we never do). */
+ DIAG_IGNORE_NEEDS_COMMENT (6, "-Wmaybe-uninitialized");
/* Fault now if this pointer is bogus. */
*(volatile mach_port_t *) portloc = *portloc;
+ DIAG_POP_NEEDS_COMMENT;
if (sigthread)
_hurdsig_end_catch_fault ();
--
2.16.2
reply other threads:[~2018-04-04 0:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180404000648.3145-1-samuel.thibault@ens-lyon.org \
--to=samuel.thibault@ens-lyon.org \
--cc=libc-alpha@sourceware.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).