lkml.org 
[lkml]   [2020]   [Nov]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH 001/141] afs: Fix fall-through warnings for Clang
    From
    Date
    On Fri, 2020-11-20 at 12:23 -0600, Gustavo A. R. Silva wrote:
    > In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple
    > warnings by explicitly adding multiple fallthrough pseudo-keywords
    > in places where the code is intended to fall through to the next
    > case.

    This is the first of the actual patches I've seen.
    I think adding fallthough for these patches isn't the best option.

    > diff --git a/fs/afs/cmservice.c b/fs/afs/cmservice.c
    []
    > @@ -322,6 +322,8 @@ static int afs_deliver_cb_callback(struct afs_call *call)
    >   return ret;
    >  
    >
    >   call->unmarshall++;
    > +
    > + fallthrough;

    My preference would be to change these to break and not fallthrough;

    >   case 5:
    >   break;
    >   }

    etc...

    \
     
     \ /
      Last update: 2020-11-21 00:18    [W:2.557 / U:1.288 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site