[PATCH 001/141] afs: Fix fall-through warnings for Clang
Joe Perches
joe at perches.com
Fri Nov 20 18:18:23 EST 2020
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...
More information about the linux-afs
mailing list