linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] nfsd: work around a gcc-5.1 warning
Date: Wed, 13 May 2015 20:59:36 +0200	[thread overview]
Message-ID: <9574260.omRer6Oeha@wuerfel> (raw)
In-Reply-To: <20150513181143.GD2827@fieldses.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 <arnd@arndb.de>
> 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 <arnd@arndb.de>
>     Signed-off-by: J. Bruce Fields <bfields@redhat.com>
> 
> 

Works for me, thanks!

	Arnd

      reply	other threads:[~2015-05-13 18:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-12 21:31 [PATCH] nfsd: work around a gcc-5.1 warning Arnd Bergmann
2015-05-13 18:11 ` J. Bruce Fields
2015-05-13 18:59   ` Arnd Bergmann [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9574260.omRer6Oeha@wuerfel \
    --to=arnd@arndb.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).