From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754681AbbEMTAG (ORCPT ); Wed, 13 May 2015 15:00:06 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:53677 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754575AbbEMTAE (ORCPT ); Wed, 13 May 2015 15:00:04 -0400 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Cc: "J. Bruce Fields" , linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] nfsd: work around a gcc-5.1 warning Date: Wed, 13 May 2015 20:59:36 +0200 Message-ID: <9574260.omRer6Oeha@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <20150513181143.GD2827@fieldses.org> References: <2121336.tAfQfAWQ2u@wuerfel> <20150513181143.GD2827@fieldses.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:/XyRXLxNHR9cHimGU8t0/x7TU0lKFrsatekaXT/T5mWgJQjE/cU i3xIX62Lizj/p40mZ5l1t+flbtfMYa8uJZN4va3Ui1Krs3bELuLAxaahTIpPFLCxzPLf1+e /FwsEwuB5UuwuUYO5gmqTGliM0J43kgscA4AEKh1ZYOSlkVqTrUGrH45nZLXzs5sn3O4FZ5 2bzJuC5/45xh7X7b1Co4g== X-UI-Out-Filterresults: notjunk:1; Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday 13 May 2015 14:11:43 J. Bruce Fields wrote: > > OK, I guess. How about simplifying slightly and doing it this way?--b > > commit 3ae81ac291ec > Author: Arnd Bergmann > Date: Tue May 12 23:31:29 2015 +0200 > > nfsd: work around a gcc-5.1 warning > > gcc-5.0 warns about a potential uninitialized variable use in nfsd: > > fs/nfsd/nfs4state.c: In function 'nfsd4_process_open2': > fs/nfsd/nfs4state.c:3781:3: warning: 'old_deny_bmap' may be used uninitialized in this function [-Wmaybe-uninitialized] > reset_union_bmap_deny(old_deny_bmap, stp); > ^ > fs/nfsd/nfs4state.c:3760:16: note: 'old_deny_bmap' was declared here > unsigned char old_deny_bmap; > ^ > > This is a false positive, the code path that is warned about cannot > actually be reached. > > This adds an initialization for the variable to make the warning go > away. > > Signed-off-by: Arnd Bergmann > Signed-off-by: J. Bruce Fields > > Works for me, thanks! Arnd From mboxrd@z Thu Jan 1 00:00:00 1970 From: arnd@arndb.de (Arnd Bergmann) Date: Wed, 13 May 2015 20:59:36 +0200 Subject: [PATCH] nfsd: work around a gcc-5.1 warning In-Reply-To: <20150513181143.GD2827@fieldses.org> References: <2121336.tAfQfAWQ2u@wuerfel> <20150513181143.GD2827@fieldses.org> Message-ID: <9574260.omRer6Oeha@wuerfel> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Wednesday 13 May 2015 14:11:43 J. Bruce Fields wrote: > > OK, I guess. How about simplifying slightly and doing it this way?--b > > commit 3ae81ac291ec > Author: Arnd Bergmann > Date: Tue May 12 23:31:29 2015 +0200 > > nfsd: work around a gcc-5.1 warning > > gcc-5.0 warns about a potential uninitialized variable use in nfsd: > > fs/nfsd/nfs4state.c: In function 'nfsd4_process_open2': > fs/nfsd/nfs4state.c:3781:3: warning: 'old_deny_bmap' may be used uninitialized in this function [-Wmaybe-uninitialized] > reset_union_bmap_deny(old_deny_bmap, stp); > ^ > fs/nfsd/nfs4state.c:3760:16: note: 'old_deny_bmap' was declared here > unsigned char old_deny_bmap; > ^ > > This is a false positive, the code path that is warned about cannot > actually be reached. > > This adds an initialization for the variable to make the warning go > away. > > Signed-off-by: Arnd Bergmann > Signed-off-by: J. Bruce Fields > > Works for me, thanks! Arnd