From patchwork Wed Apr 4 00:06:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 894825 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-91404-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="HwsYJLCX"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40G5qS6Nj8z9ryG for ; Wed, 4 Apr 2018 10:07:00 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id; q=dns; s= default; b=W2ZS/wDHUYRGD5sLKngq+gdxNtboYG9XmszWf4DvpB9s7ryd/1rc7 BKjH22/LuOIchMWc2+h49wIfg18llbFHZHn5Oqpq875eOvMm9J2Q4XOegyINgnNJ ZlikvynO4DtMqiM9iRGl+v7kaPNlvp6W37ElxK6mLRsAagCVm0fuVM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id; s=default; bh=atVl/HMJ/JfzL5ZAjS2uCEpHJIM=; b=HwsYJLCXlS1C70bZ1SDF4kbEWlj8 +IpWOR0AxRxn8YiyFlrolXkf9gp/bbU6z0c2Q4ZvJOyaKQ3h7g72wpGOzfHlV4MI k7mmtTe33963+GnY4giXWxfi8eS+ykh/HcgJQPHL4CrbInJKHpIZlEjhS1My79KL BDHFZUSbYJKD0Io= 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-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@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, 4 Apr 2018 02:06:48 +0200 Message-Id: <20180404000648.3145-1-samuel.thibault@ens-lyon.org> * 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 ();