fs/nfs: fix new compiler warning about boolean in switch
authorAndre Przywara <andre.przywara@arm.com>
Thu, 23 Apr 2015 16:17:40 +0000 (17:17 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 30 Apr 2017 03:49:15 +0000 (05:49 +0200)
commit4064f65ae2d7ef04285866f697d94fd6013e22ef
tree9288c3e125841491e38de84739e6d9b57fea49f8
parent803e3757c40366d673b7792f6ac07793825fafeb
fs/nfs: fix new compiler warning about boolean in switch

commit c7757074839f2cd440521482d76ea180d0d4bdac upstream.

The brand new GCC 5.1.0 warns by default on using a boolean in the
switch condition. This results in the following warning:

fs/nfs/nfs4proc.c: In function 'nfs4_proc_get_rootfh':
fs/nfs/nfs4proc.c:3100:10: warning: switch condition has boolean value [-Wswitch-bool]
  switch (auth_probe) {
          ^

This code was obviously using switch to make use of the fall-through
semantics (without the usual comment, though).
Rewrite that code using if statements to avoid the warning and make
the code a bit more readable on the way.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfs/nfs4proc.c