Thread (5 messages) 5 messages, 3 authors, 2020-11-24

Re: [PATCH][next] mwifiex: Fix fall-through warnings for Clang

From: "Gustavo A. R. Silva" <gustavoars@kernel.org>
Date: 2020-11-17 16:32:40
Also in: linux-hardening, linux-wireless, lkml

On Tue, Nov 17, 2020 at 08:15:59AM -0800, Joe Perches wrote:
On Tue, 2020-11-17 at 10:09 -0600, Gustavo A. R. Silva wrote:
quoted
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple
warnings by explicitly adding multiple break statements instead of
letting the code fall through to the next case.
Thanks Gustavo.

I think this is better style than the gcc allowed
undescribed fallthrough to break;

gcc developers disagree though:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91432
Yeah; I mention that in this[1] changelog text, together with the
reasons why we think the Clang approach is safer. which is exactly
the same information contained in the link[2] included in the changelog
text for this commit.

--
Gustavo

[1] https://git.kernel.org/linus/4169e889e5889405d54cec27d6e9f7f0ce3c7096
[2] https://github.com/KSPP/linux/issues/115
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help