Re: [PATCH] afs: Mark expected switch fall-throughs

From: Kees Cook
Date: Mon Apr 08 2019 - 20:11:04 EST


On Thu, Jan 10, 2019 at 2:02 PM Gustavo A. R. Silva
<gustavo@xxxxxxxxxxxxxx> wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Notice that in many cases I placed a /* Fall through */ comment
> at the bottom of the case, which what GCC is expecting to find.
>
> In other cases I had to tweak a bit the format of the comments.
>
> This patch suppresses ALL missing-break-in-switch false positives
> in fs/afs
>
> Addresses-Coverity-ID: 115042 ("Missing break in switch")
> Addresses-Coverity-ID: 115043 ("Missing break in switch")
> Addresses-Coverity-ID: 115045 ("Missing break in switch")
> Addresses-Coverity-ID: 1357430 ("Missing break in switch")
> Addresses-Coverity-ID: 115047 ("Missing break in switch")
> Addresses-Coverity-ID: 115050 ("Missing break in switch")
> Addresses-Coverity-ID: 115051 ("Missing break in switch")
> Addresses-Coverity-ID: 1467806 ("Missing break in switch")
> Addresses-Coverity-ID: 1467807 ("Missing break in switch")
> Addresses-Coverity-ID: 1467811 ("Missing break in switch")
> Addresses-Coverity-ID: 115041 ("Missing break in switch")
> Signed-off-by: Gustavo A. R. Silva <gustavo@xxxxxxxxxxxxxx>

These look good to me. Gets us another step to finishing this. :)

Reviewed-by: Kees Cook <keescook@xxxxxxxxxxxx>

--
Kees Cook