From: David Howells <dhowells@redhat.com>
To: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Cc: dhowells@redhat.com, linux-afs@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] afs: Mark expected switch fall-throughs
Date: Thu, 02 Aug 2018 10:12:22 +0100 [thread overview]
Message-ID: <25892.1533201142@warthog.procyon.org.uk> (raw)
In-Reply-To: <20180731215825.GA10268@embeddedor.com>
Gustavo A. R. Silva <gustavo@embeddedor.com> wrote:
> + /* Fall through */
> no_msw:
> /* extract the returned data length */
> case 2:
That would appear to be added in the wrong place. The fall-through is after
the no_msw label.
> +
> + /* Fall through */
> no_volname_padding:
Ditto - and several other dittos too.
> - /* Done */
> + /* Fall through - Done */
Yuck.
> +
> + /* fall through */
Capital 'F' for consistency please.
Whilst I understand the argument for explicitly marking the fall-throughs to
catch missing breaks, it's a bit irritating at times. Can we have an
additional annotation that tells the compiler that every case in a switch
statement is going to fall through (so no break before case) except the last?
That would be more useful in this case.
David
next prev parent reply other threads:[~2018-08-02 9:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-31 21:58 [PATCH] afs: Mark expected switch fall-throughs Gustavo A. R. Silva
2018-08-02 9:12 ` David Howells [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-10-17 11:36 Gustavo A. R. Silva
2019-01-10 22:02 Gustavo A. R. Silva
2019-04-09 0:10 ` Kees Cook
2019-04-09 9:28 ` David Howells
2019-04-09 15:18 ` Kees Cook
2019-04-16 13:35 ` David Howells
2019-04-09 9:34 ` David Howells
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=25892.1533201142@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=gustavo@embeddedor.com \
--cc=linux-afs@lists.infradead.org \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox