lkml.org 
[lkml]   [2019]   [Apr]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] afs: Mark expected switch fall-throughs
Date
Gustavo A. R. Silva <gustavo@embeddedor.com> wrote:

Please fix the compiler so that you can annotate a switch-statement to say
that every case must fall through (except, perhaps, the last).

> /* extract the FID array and its count in two steps */
> + /* fall through */
> case 1:

Capitialise "Fall" for consistency, please, and can you put the fall-through
marker *before* the comment introducing the case please? It belongs to the
preceding section.

> /* extract the callback array and its count in two steps */
> + /* fall through */
> case 3:

Ditto.

> /* extract the FID array and its count in two steps */
> + /* Fall through */

Ditto on putting the fall-through before the introductory comment.

(And more dittos).

> - /* Extract fsEndpoints[] entries */
> + /* Fall through - and extract fsEndpoints[] entries */

And here you're doing something different yet again, though you could drop
either the "-" or the "and".

David

\
 
 \ /
  Last update: 2019-04-09 11:35    [W:0.094 / U:38.904 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site