From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 95585 invoked by alias); 4 Apr 2018 00:06:54 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 95567 invoked by uid 89); 4 Apr 2018 00:06:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.1 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_HELO_PASS,SPF_NEUTRAL autolearn=ham version=3.3.2 spammy= X-HELO: hera.aquilenet.fr From: Samuel Thibault To: libc-alpha@sourceware.org Cc: Samuel Thibault Subject: [hurd,commited] hurd: Silence warning Date: Wed, 04 Apr 2018 00:06:00 -0000 Message-Id: <20180404000648.3145-1-samuel.thibault@ens-lyon.org> X-SW-Source: 2018-04/txt/msg00099.txt.bz2 * 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 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 + 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