All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve Dickson <SteveD@RedHat.com>
To: "J. Bruce Fields" <bfields@fieldses.org>
Cc: Linux NFS Mailing list <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH 05/11] nfsd.c: removed a few warnings
Date: Fri, 21 Jul 2017 12:20:25 -0400	[thread overview]
Message-ID: <686c124a-d4f8-836b-912d-32701421ad05@RedHat.com> (raw)
In-Reply-To: <20170720182824.GB19909@fieldses.org>



On 07/20/2017 02:28 PM, J. Bruce Fields wrote:
> On Wed, Jul 19, 2017 at 04:53:48PM -0400, Steve Dickson wrote:
>> nfsd.c:187:8: warning: this statement may fall through [-Wimplicit-fallthrough=]
>> nfsd.c:213:8: warning: this statement may fall through [-Wimplicit-fallthrough=]nfsd.c:263:4: warning: this statement may fall through [-Wimplicit-fallthrough=]
> 
> Are you sure about this?  It looks to me like the fall through was
> intended in the -N4 and -V4 cases.
Wow... how un-obvious that! The -N4 actually does use the 
NFSCTL_VERUNSET() in the 3,2 case... Talk about in needed
of a comment! ;-)

steved.

> 
> --b.
> 
>>
>> Signed-off-by: Steve Dickson <steved@redhat.com>
>> ---
>>  utils/nfsd/nfsd.c | 5 ++++-
>>  1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/utils/nfsd/nfsd.c b/utils/nfsd/nfsd.c
>> index 2b38249..1d35658 100644
>> --- a/utils/nfsd/nfsd.c
>> +++ b/utils/nfsd/nfsd.c
>> @@ -198,6 +198,7 @@ main(int argc, char **argv)
>>  					minorvers = 0;
>>  					minorversset = minormask;
>>  				}
>> +				break;
>>  			case 3:
>>  			case 2:
>>  				NFSCTL_VERUNSET(versbits, c);
>> @@ -220,6 +221,7 @@ main(int argc, char **argv)
>>  					NFSCTL_MINORSET(minorvers, i);
>>  				} else
>>  					minorvers = minorversset = minormask;
>> +				break;
>>  			case 3:
>>  			case 2:
>>  				NFSCTL_VERSET(versbits, c);
>> @@ -261,8 +263,9 @@ main(int argc, char **argv)
>>  			break;
>>  		default:
>>  			fprintf(stderr, "Invalid argument: '%c'\n", c);
>> +			/* FALLTHRU */
>>  		case 'h':
>> -			usage(progname);
>> +			usage(progname); /* usage does not return */
>>  		}
>>  	}
>>  
>> -- 
>> 2.13.3
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2017-07-21 16:20 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-19 20:53 [PATCH 00/11] Removed a bunch random warnings Steve Dickson
2017-07-19 20:53 ` [PATCH 01/11] rpcdebug.c: remove a warning Steve Dickson
2017-07-19 20:53 ` [PATCH 02/11] present_address: " Steve Dickson
2017-07-20 18:42   ` J. Bruce Fields
2017-07-19 20:53 ` [PATCH 03/11] atomicio: removed " Steve Dickson
2017-07-20 18:24   ` J. Bruce Fields
2017-07-21 14:45     ` Steve Dickson
2017-07-19 20:53 ` [PATCH 04/11] cache.c: removed a couple warning Steve Dickson
2017-07-19 20:53 ` [PATCH 05/11] nfsd.c: removed a few warnings Steve Dickson
2017-07-20 18:28   ` J. Bruce Fields
2017-07-21 16:20     ` Steve Dickson [this message]
2017-07-19 20:53 ` [PATCH 06/11] bldev_read_serial: removed a couple warnings Steve Dickson
2017-07-19 20:53 ` [PATCH 07/11] device-discovery.c: removed a warning Steve Dickson
2017-07-19 20:53 ` [PATCH 08/11] network.c: removed some warnings Steve Dickson
2017-07-20 18:37   ` J. Bruce Fields
2017-07-21 16:29     ` Steve Dickson
2017-07-21 18:30       ` J. Bruce Fields
2017-07-19 20:53 ` [PATCH 09/11] nfsmount: remove a warning Steve Dickson
2017-07-19 20:53 ` [PATCH 10/11] nfs4mount: removed " Steve Dickson
2017-07-19 20:53 ` [PATCH 11/11] nfsdcltrack.c: remove " Steve Dickson
2017-07-20 10:32   ` Jeff Layton
2017-07-21 16:37 [PATCH 00/11 V2] Removed a bunch random warnings Steve Dickson
2017-07-21 16:38 ` [PATCH 05/11] nfsd.c: removed a few warnings Steve Dickson

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=686c124a-d4f8-836b-912d-32701421ad05@RedHat.com \
    --to=steved@redhat.com \
    --cc=bfields@fieldses.org \
    --cc=linux-nfs@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.