From patchwork Wed Oct 2 21:12:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 1170906 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-105594-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="YZkZFAY+"; 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 46k84D2CPGz9sCJ for ; Thu, 3 Oct 2019 07:13: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:date:from:to:subject:message-id:mime-version :content-type; q=dns; s=default; b=ObQwvk50XvNn5tf88tHcOgLcWytwC d6pB3JOiqA8A21s8AGXyJMDnit6yRnTIORbIHDIq1bqwMrVs+yZTb2I2Er+HQ73/ FXCovcyXTiJqJDMKJurV6sWnZ2rqzZC0DvdAM51uzvTeqh/Nc0A5es+SUee8rvXw VlyDcTx/kLPu9Q= 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:date:from:to:subject:message-id:mime-version :content-type; s=default; bh=iiBye47VvDrp6sNE8WNwZBVqvVg=; b=YZk ZFAY+o3egK3+iutXYR0jzifpLgEjeJDa4WQBTGvq3vpCdwZLsbvLOe8NnZmKNOgW 2cAFaGgjYXvHol69UsCbSwwyHyXrrAV5MKSUQsDg3l0M0ss3a1w/TzCverXtY0LH xx0SYSVoJy56Lc90HycMRbV2ifeEVRUbKRX4vyQE= Received: (qmail 77911 invoked by alias); 2 Oct 2019 21:12:53 -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 77859 invoked by uid 89); 2 Oct 2019 21:12:53 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-15.2 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_SHORT, SPF_PASS autolearn=ham version=3.3.1 spammy=unaffected, deadline X-HELO: esa1.mentor.iphmx.com IronPort-SDR: F8vXeuR8IRbWVEF9w+JB1BsgyXTaJJG79FqWchRL6P2BgiwI0ctf6NCvnvRSm3Qf4TA1CbKy7O a/CdNlrcuMQ75jf1zp/2nksMob8QVw4HQMX7SjlRpB07WmPehCnEGjA8zl+pnMb3QstFI8V+27 UWwMDRifJeTFU8XWux9NdYUNcrkg36vDOQ+v+XAEWgY3s0kDPjrARHrjaEm/vnQAo5V+G9DCWq FXhABcFP9CqODsgsbVeGX9OK4kYsCIKx7jYIzgswKFtEC+lG2rBfxUJXbXEZNo8WPWHaFdP1Kk 3yw= IronPort-SDR: 7TMjgx8NwHHSo+4iRtSeLSPYvDPMg2rbWkzqGKRzKoHd4uI4u6IJxH09mlK4mRE7j2YsRto8HD 5c1FPkFImt3lp7o929IIXvnK8ZPrSlnKR9AGzYbbgfRgXESRytcC/isye9fAu6T6OlGTujP23A cUrK549aHJ3xGsX5p5xHbZ2fxSJ/It6EmxSr7oXKTo/XOpzczezFDsVsIgPDMHUh4aqUhku3A4 fzXc90dy880TJumGiKnWeeLANYxPp8XtFEU35E/VE02y9rFyiMj5M/5+X7svt+nYzgTolvLBJe 5jQ= Date: Wed, 2 Oct 2019 21:12:46 +0000 From: Joseph Myers To: Subject: Disable -Wmaybe-uninitialized for total_deadline in sunrpc/clnt_udp.c [committed] Message-ID: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 To work around for RV32, we recently disabled -Wmaybe-uninitialized for some inline functions in inet/net-internal.h, as included by sunrpc/clnt_udp.c. The same error has now appeared with current GCC trunk for MIPS, in a form that is located at the definition of the variable in question and so unaffected by the disabling in inet/net-internal.h. Thus, this patch adds the same disabling around the definition of that variable, to cover the MIPS case. Tested with build-many-glibcs.py (compilers and glibcs stages) for mips64-linux-gnu with GCC mainline. 2019-10-02 Joseph Myers * sunrpc/clnt_udp.c: Include . (clntudp_call): Disable -Wmaybe-uninitialized around declaration of total_deadline. diff --git a/sunrpc/clnt_udp.c b/sunrpc/clnt_udp.c index c2436e3ebc..ee79b09b40 100644 --- a/sunrpc/clnt_udp.c +++ b/sunrpc/clnt_udp.c @@ -57,6 +57,7 @@ #include #include #include +#include extern u_long _create_xid (void); @@ -290,7 +291,17 @@ clntudp_call (/* client handle */ int anyup; /* any network interface up */ struct deadline_current_time current_time = __deadline_current_time (); + /* GCC 10 for MIPS reports total_deadline as possibly used + uninitialized; see + . In fact it + is initialized conditionally and only ever used under the same + condition. The same warning is also disabled in + inet/net-internal.h because in some other configurations GCC + gives the warning in an inline function. */ + DIAG_PUSH_NEEDS_COMMENT; + DIAG_IGNORE_NEEDS_COMMENT (10, "-Wmaybe-uninitialized"); struct deadline total_deadline; /* Determined once by overall timeout. */ + DIAG_POP_NEEDS_COMMENT; struct deadline response_deadline; /* Determined anew for each query. */ /* Choose the timeout value. For non-sending usage (xargs == NULL),