Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp727638img; Fri, 22 Mar 2019 07:22:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqxtPX1FaH1qONIUxc0U9YO4dfVlPwdQ5Okmd+s+HQFkJjNbaY5UNYVhi5cryEBWdmP2XzHx X-Received: by 2002:a17:902:7592:: with SMTP id j18mr9648785pll.300.1553264547612; Fri, 22 Mar 2019 07:22:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553264547; cv=none; d=google.com; s=arc-20160816; b=iSjB1gs5XSGcgEXbDxOO/KEJhWbh5IxUQzCJDjzp3rTKooHS+IKf2whdeobYqpLLtU nM3Vr0k5hVHNiz7pIN1hOuH2E5wnwbAqfVOEy5slA5REytNIuwV9HsO4yqc65w1+O60G x4I/PWBtcQz6Wj5LRpi8bVyx6lX1qZfoeQ+JH0B6Xnj+D2x1ijvfklJXWz7K1ccs4QMP MOtIG/CF46J18tp7FhPpyqOTx5wEYc3xYnwzq2a70zt4lM82nuq7gP6jo0rbCPGWEjWa BvNHTGxCbg/GxfiNJCqPF6tO3aE8fEyJ33Da5875GiF7zfSBJEmxgHp8VeyU111cn5qv hKhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=AIqzvAi2mfLQhdhmJCosIkSy2p1Sjz9jEXyb2Ie6sPk=; b=l14q4Tx2k8Bneg7SRZjEEPAUybS937rENSiM2DNP4iDgmVJ2+l95nKpmnA61VqtZjR Z8iUyXHUny9rxth1Y/TNIf4guw0j0pyKJaV+is4mNegw89Gx7m8o0EdnBqpslBPuHRF3 TN3jVgAhEqN5gQcmehZOXFUdxfHb2+aMTTuopG5nhrLIh2jKAiCa2F5qQdGtS8Owqhc4 ywf5f6mWpRrXFSyuPCBBH1WaVOV2XX1pyvZY6N00te/Z3Ru+DxR1tmMqjCy9R3kXOLLB qYkSI8HdTv2zPhVZY4GZLNnKdS4mu/9mjLp74Y51RnuyQ4/wEfosRKxEORn0nvPrwNYd 63hA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p66si7251942pfp.231.2019.03.22.07.22.10; Fri, 22 Mar 2019 07:22:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728610AbfCVOTh (ORCPT + 99 others); Fri, 22 Mar 2019 10:19:37 -0400 Received: from mout.kundenserver.de ([212.227.126.135]:41881 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728103AbfCVOTg (ORCPT ); Fri, 22 Mar 2019 10:19:36 -0400 Received: from wuerfel.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.129]) with ESMTPA (Nemesis) id 1MbC5g-1gaC3Q0f7o-00be3v; Fri, 22 Mar 2019 15:19:24 +0100 From: Arnd Bergmann To: Dave Kleikamp Cc: clang-built-linux@googlegroups.com, Nick Desaulniers , Nathan Chancellor , Arnd Bergmann , jfs-discussion@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: [PATCH] jfs: fix bogus variable self-initialization Date: Fri, 22 Mar 2019 15:19:16 +0100 Message-Id: <20190322141922.691391-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:dysjoZs9F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: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A statement was originally added in 2006 to shut up a gcc warning, now but now clang warns about it: fs/jfs/jfs_txnmgr.c:1932:15: error: variable 'pxd' is uninitialized when used within its own initialization [-Werror,-Wuninitialized] pxd_t pxd = pxd; /* truncated extent of xad */ ~~~ ^~~ Modern versions of gcc are fine without the silly assignment, so just drop it. Tested with gcc-4.6 (released 2011), 4.7, 4.8, and 4.9. Fixes: c9e3ad6021e5 ("JFS: Get rid of "may be used uninitialized" warnings") Signed-off-by: Arnd Bergmann --- fs/jfs/jfs_txnmgr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/jfs/jfs_txnmgr.c b/fs/jfs/jfs_txnmgr.c index a5663cb621d8..78789c5ed36b 100644 --- a/fs/jfs/jfs_txnmgr.c +++ b/fs/jfs/jfs_txnmgr.c @@ -1928,8 +1928,7 @@ static void xtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, * header ? */ if (tlck->type & tlckTRUNCATE) { - /* This odd declaration suppresses a bogus gcc warning */ - pxd_t pxd = pxd; /* truncated extent of xad */ + pxd_t pxd; /* truncated extent of xad */ int twm; /* -- 2.20.0