[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <29743c8d0a5e5f4a1ead55bc614ed53079a42597.camel@perches.com>
Date: Thu, 15 Aug 2019 15:55:39 -0700
From: Joe Perches <joe@...ches.com>
To: Nick Desaulniers <ndesaulniers@...gle.com>
Cc: David Howells <dhowells@...hat.com>,
Nathan Chancellor <natechancellor@...il.com>,
Nathan Huckleberry <nhuck@...gle.com>,
linux-afs@...ts.infradead.org, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] afs: Move comments after /* fallthrough */
On Thu, 2019-08-15 at 15:34 -0700, Nick Desaulniers wrote:
> On Wed, Aug 14, 2019 at 7:36 PM Joe Perches <joe@...ches.com> wrote:
> > Make the code a bit easier for a script to appropriately convert
> > case statement blocks with /* fallthrough */ comments to a macro by
> > moving comments describing the next case block to the case statement.
> >
> > Signed-off-by: Joe Perches <joe@...ches.com>
> > ---
> > fs/afs/cmservice.c | 10 +++-------
> > fs/afs/fsclient.c | 51 +++++++++++++++++----------------------------------
> > fs/afs/vlclient.c | 50 +++++++++++++++++++++++++-------------------------
> > fs/afs/yfsclient.c | 51 +++++++++++++++++----------------------------------
>
> So these changes are across just fs/afs, how many patches like this
> would you need across the whole tree to solve this problem?
No idea. I only looked at afs when Nathan Chancellor showed
there were 350 or so changes necessary in the kernel tree.
The afs entries were 50 of them so I just looked and saw why.
I haven't looked at all the others.
https://gist.github.com/nathanchance/ffbd71b48ba197837e1bdd9bb863b85f
But probably most of the others are missing a fallthrough to
a break like:
switch {foo} {
case 1:
<bar>;
default:
break;
}
where gcc does not emit a warning but clang apparently does.
I do think gcc should emit a warning here too so I filed a
gcc bugzilla entry.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91432
Powered by blists - more mailing lists