From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E7319C2D0DB for ; Tue, 28 Jan 2020 14:09:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BF32024688 for ; Tue, 28 Jan 2020 14:09:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580220596; bh=jtqMy6ATgTfI9cuLYEB8Nv9vnN6mjYtUcw08ByTMsL8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=IWqzyNuTq6g0T9LwEOVx2umRk/KZy4rSDl2zQ18IsFsdVzpj5/RfYSjweAH463asO SxAsHHxvAMoWoZdD4f/vGDMO6tAJ0Fb1/7yT/1vWvoJLcVRpqBgrHVbsx8jj/vxi0i QG5P1gewJOJkFjVk3HYLYNT4P3WgRkgAvrZDtoVk= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727510AbgA1OJ4 (ORCPT ); Tue, 28 Jan 2020 09:09:56 -0500 Received: from mail.kernel.org ([198.145.29.99]:58290 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727901AbgA1OJr (ORCPT ); Tue, 28 Jan 2020 09:09:47 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B7C322468A; Tue, 28 Jan 2020 14:09:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580220587; bh=jtqMy6ATgTfI9cuLYEB8Nv9vnN6mjYtUcw08ByTMsL8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lW2iEx84RHqCYI+q6FDX34g+d88YZEKzS74qST82BTGfed60MxK0BZ9lec3oPkw0Q tfNW6UjvhVB8ieXabp1yY8l8EXqkbwcRJvU49hIE6QbZUSvBAZRxLbF6FGT1rIHOvT i2TEmbTLjW9ucsTHZ5UXKO/LBFn9kP+wOfx98nOU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Dave Kleikamp , Sasha Levin Subject: [PATCH 4.4 065/183] jfs: fix bogus variable self-initialization Date: Tue, 28 Jan 2020 15:04:44 +0100 Message-Id: <20200128135836.496090438@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200128135829.486060649@linuxfoundation.org> References: <20200128135829.486060649@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann [ Upstream commit a5fdd713d256887b5f012608701149fa939e5645 ] 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 Signed-off-by: Dave Kleikamp Signed-off-by: Sasha Levin --- 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 d595856453b24..de6351c1c8db2 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.1