* [PATCH][next] ima: Fix fall-through warning for Clang
@ 2021-06-07 20:49 Gustavo A. R. Silva
2021-06-08 17:02 ` Kees Cook
0 siblings, 1 reply; 2+ messages in thread
From: Gustavo A. R. Silva @ 2021-06-07 20:49 UTC (permalink / raw)
To: Mimi Zohar, Dmitry Kasatkin, James Morris, Serge E. Hallyn
Cc: linux-integrity, linux-security-module, linux-kernel,
Gustavo A. R. Silva, linux-hardening, Kees Cook
In preparation to enable -Wimplicit-fallthrough for Clang, fix a
fall-through warning by explicitly adding a break statement instead
of just letting the code fall through to the next case.
Link: https://github.com/KSPP/linux/issues/115
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
---
JFYI: We had thousands of these sorts of warnings and now we are down
to just 13 in linux-next(20210607). This is one of those last
remaining warnings. :)
security/integrity/ima/ima_template_lib.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/security/integrity/ima/ima_template_lib.c b/security/integrity/ima/ima_template_lib.c
index 518fd50ea48a..8f96247b4a5c 100644
--- a/security/integrity/ima/ima_template_lib.c
+++ b/security/integrity/ima/ima_template_lib.c
@@ -119,6 +119,7 @@ static void ima_show_template_data_ascii(struct seq_file *m,
default:
break;
}
+ break;
default:
break;
}
--
2.27.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH][next] ima: Fix fall-through warning for Clang
2021-06-07 20:49 [PATCH][next] ima: Fix fall-through warning for Clang Gustavo A. R. Silva
@ 2021-06-08 17:02 ` Kees Cook
0 siblings, 0 replies; 2+ messages in thread
From: Kees Cook @ 2021-06-08 17:02 UTC (permalink / raw)
To: Gustavo A. R. Silva
Cc: Mimi Zohar, Dmitry Kasatkin, James Morris, Serge E. Hallyn,
linux-integrity, linux-security-module, linux-kernel,
linux-hardening
On Mon, Jun 07, 2021 at 03:49:34PM -0500, Gustavo A. R. Silva wrote:
> In preparation to enable -Wimplicit-fallthrough for Clang, fix a
> fall-through warning by explicitly adding a break statement instead
> of just letting the code fall through to the next case.
>
> Link: https://github.com/KSPP/linux/issues/115
> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
> ---
> JFYI: We had thousands of these sorts of warnings and now we are down
> to just 13 in linux-next(20210607). This is one of those last
> remaining warnings. :)
Looks right to me; thanks!
Reviewed-by: Kees Cook <keescook@chromium.org>
>
> security/integrity/ima/ima_template_lib.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/security/integrity/ima/ima_template_lib.c b/security/integrity/ima/ima_template_lib.c
> index 518fd50ea48a..8f96247b4a5c 100644
> --- a/security/integrity/ima/ima_template_lib.c
> +++ b/security/integrity/ima/ima_template_lib.c
> @@ -119,6 +119,7 @@ static void ima_show_template_data_ascii(struct seq_file *m,
> default:
> break;
> }
> + break;
> default:
> break;
> }
> --
> 2.27.0
>
--
Kees Cook
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-06-08 17:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-07 20:49 [PATCH][next] ima: Fix fall-through warning for Clang Gustavo A. R. Silva
2021-06-08 17:02 ` Kees Cook
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).