In preparation to enable -Wimplicit-fallthrough by default, mark
switch-case statements where fall-through is intentional, explicitly in
order to fix a bunch of -Wimplicit-fallthrough warnings.
Warning level 3 was used: -Wimplicit-fallthrough=3.
Signed-off-by: Gustavo A. R. Silva
---
arch/x86/i
On Tue, 29 Jan 2019, Gustavo A. R. Silva wrote:
> In preparation to enable -Wimplicit-fallthrough by default, mark
> switch-case statements where fall-through is intentional, explicitly in
> order to fix a bunch of -Wimplicit-fallthrough warnings.
>
> Warning level 3 was used: -Wimplicit-fallthro
On Wed, Nov 29, 2017 at 7:14 AM, Thomas Gleixner wrote:
> On Wed, 29 Nov 2017, Gustavo A. R. Silva wrote:
>> Quoting Thomas Gleixner :
>>
>> >
>> > So I have to ask WHY this information was not in the changelog of the patch
>> > in question:
>> >
>> > 1) How it works
>> >
>> > 2) Why comments
On Wed, 29 Nov 2017, Gustavo A. R. Silva wrote:
> Quoting Thomas Gleixner :
>
> >
> > So I have to ask WHY this information was not in the changelog of the patch
> > in question:
> >
> > 1) How it works
> >
> > 2) Why comments have been chosen over macros
> >
>
> I will add this info and
Quoting Thomas Gleixner :
So I have to ask WHY this information was not in the changelog of the patch
in question:
1) How it works
2) Why comments have been chosen over macros
I will add this info and send the patch again.
In preparation to enabling -Wimplicit-fallthrough, mark sw
Hi Joe,
On Wed, Nov 29, 2017 at 2:07 AM, Joe Perches wrote:
> On Tue, 2017-11-28 at 14:37 -0600, Gustavo A. R. Silva wrote:
>> Quoting Linus Torvalds :
>> > On Tue, Nov 28, 2017 at 11:00 AM, Alan Cox
>> > wrote:
>> > > The notation in question has been standard in tools like lint since the
>> >
On Tue, 2017-11-28 at 14:37 -0600, Gustavo A. R. Silva wrote:
> Quoting Linus Torvalds :
>
> > On Tue, Nov 28, 2017 at 11:00 AM, Alan Cox
> > wrote:
> > >
> > > The notation in question has been standard in tools like lint since the
> > > end of the 1970s
> >
> > Yes.
> >
> > That said, mayb
On Tue, 28 Nov 2017, Gustavo A. R. Silva wrote:
> The thing about taking 'any comment' as valid is false if you add the
> following to your Makefile:
>
> KBUILD_CFLAGS += $(call cc-option,-Wimplicit-fallthrough)
>
> This option takes the following comments as valid:
>
> /* fall through */
> /*
Quoting Linus Torvalds :
On Tue, Nov 28, 2017 at 11:00 AM, Alan Cox
wrote:
The notation in question has been standard in tools like lint since the
end of the 1970s
Yes.
That said, maybe one option would be to annotate the "case:" and
"default:" statements if that makes people happier.
I
On Tue, Nov 28, 2017 at 12:08 PM, Thomas Gleixner wrote:
> On Tue, 28 Nov 2017, Linus Torvalds wrote:
>
>> On Tue, Nov 28, 2017 at 11:00 AM, Alan Cox
>> wrote:
>> >
>> > The notation in question has been standard in tools like lint since the
>> > end of the 1970s
>>
>> Yes.
>>
>> That said, mayb
Quoting Thomas Gleixner :
On Tue, 28 Nov 2017, Alan Cox wrote:
> I have no idea who came up with that brilliant idea of parsing comments in
> the code. It's so simple to make this parser completely fail that it's not
Stephen Johnson (author of the V7 portable C compiler), which is where
it's
On Tue, 28 Nov 2017, Alan Cox wrote:
> > I have no idea who came up with that brilliant idea of parsing comments in
> > the code. It's so simple to make this parser completely fail that it's not
>
> Stephen Johnson (author of the V7 portable C compiler), which is where
> it's from (the lint tool)
On Tue, 28 Nov 2017, Linus Torvalds wrote:
> On Tue, Nov 28, 2017 at 11:00 AM, Alan Cox wrote:
> >
> > The notation in question has been standard in tools like lint since the
> > end of the 1970s
>
> Yes.
>
> That said, maybe one option would be to annotate the "case:" and
> "default:" statemen
On Tue, 2017-11-28 at 11:10 -0800, Linus Torvalds wrote:
> On Tue, Nov 28, 2017 at 11:00 AM, Alan Cox wrote:
> >
> > The notation in question has been standard in tools like lint since the
> > end of the 1970s
>
> Yes.
>
> That said, maybe one option would be to annotate the "case:" and
> "defa
On Tue, 28 Nov 2017, Gustavo A. R. Silva wrote:
> This is what we want to add:
>
> # Warn about missing switch break or fall-through comment.
> KBUILD_CFLAGS += $(call cc-option,-Wimplicit-fallthrough)
Can this be made to ignore comments and only accept the proper annotation?
> > > I have no id
On Tue, Nov 28, 2017 at 11:00 AM, Alan Cox wrote:
>
> The notation in question has been standard in tools like lint since the
> end of the 1970s
Yes.
That said, maybe one option would be to annotate the "case:" and
"default:" statements if that makes people happier.
IOW, we could do something l
> I have no idea who came up with that brilliant idea of parsing comments in
> the code. It's so simple to make this parser completely fail that it's not
Stephen Johnson (author of the V7 portable C compiler), which is where
it's from (the lint tool). He also wrote yacc so he does know a bit about
Quoting Thomas Gleixner :
On Tue, 28 Nov 2017, Thomas Gleixner wrote:
+CC Linus.
On Tue, 28 Nov 2017, Thomas Gleixner wrote:
> On Tue, 28 Nov 2017, Gustavo A. R. Silva wrote:
> > Quoting Thomas Gleixner :
> > > > To be honest, such comments annoy me during a code review
especially when
>
On Tue, 28 Nov 2017, Thomas Gleixner wrote:
+CC Linus.
> On Tue, 28 Nov 2017, Thomas Gleixner wrote:
>
> > On Tue, 28 Nov 2017, Gustavo A. R. Silva wrote:
> > > Quoting Thomas Gleixner :
> > > > > To be honest, such comments annoy me during a code review especially
> > > > > when
> > > > > the
On Tue, 28 Nov 2017, Thomas Gleixner wrote:
> On Tue, 28 Nov 2017, Gustavo A. R. Silva wrote:
> > Quoting Thomas Gleixner :
> > > > To be honest, such comments annoy me during a code review especially
> > > > when
> > > > the fallthrough is so obvious as in this case. There might be cases
> > >
On Tue, 28 Nov 2017, Gustavo A. R. Silva wrote:
> Quoting Thomas Gleixner :
> > > To be honest, such comments annoy me during a code review especially when
> > > the fallthrough is so obvious as in this case. There might be cases where
> > > its worth to document because it's non obvious, but docum
Quoting Thomas Gleixner :
On Tue, 28 Nov 2017, Thomas Gleixner wrote:
On Tue, 28 Nov 2017, Gustavo A. R. Silva wrote:
> Quoting Thomas Gleixner :
>
> > On Mon, 27 Nov 2017, Gustavo A. R. Silva wrote:
> >
> > > In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> > > where we
On Tue, 28 Nov 2017, Thomas Gleixner wrote:
> On Tue, 28 Nov 2017, Gustavo A. R. Silva wrote:
> > Quoting Thomas Gleixner :
> >
> > > On Mon, 27 Nov 2017, Gustavo A. R. Silva wrote:
> > >
> > > > In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> > > > where we are expecting t
On Tue, 28 Nov 2017, Gustavo A. R. Silva wrote:
> Quoting Thomas Gleixner :
>
> > On Mon, 27 Nov 2017, Gustavo A. R. Silva wrote:
> >
> > > In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> > > where we are expecting to fall through.
> >
> > > case 0:
> > >
Quoting Thomas Gleixner :
On Mon, 27 Nov 2017, Gustavo A. R. Silva wrote:
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
case 0:
if (!n--) break;
*args++ = regs->bx
On Mon, 27 Nov 2017, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
> case 0:
> if (!n--) break;
> *args++ = regs->bx;
> + /*
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Signed-off-by: Gustavo A. R. Silva
---
arch/x86/include/asm/syscall.h | 28
1 file changed, 28 insertions(+)
diff --git a/arch/x86/include/asm/syscall.h b/ar
27 matches
Mail list logo