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

From: Gustavo A. R. Silva
Date: Tue Nov 17 2020 - 11:33:01 EST


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:
> > 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