* Re: kernel/bpf/verifier.c: 4 * possible unintended fallthrough ? [not found] <VI1PR08MB102286884ADF02FB45C203109C900@VI1PR08MB1022.eurprd08.prod.outlook.com> @ 2016-12-20 16:17 ` Alexei Starovoitov [not found] ` <VI1PR08MB10228EE1E2FA0EBFEA78DE919C900@VI1PR08MB1022.eurprd08.prod.outlook.com> 0 siblings, 1 reply; 2+ messages in thread From: Alexei Starovoitov @ 2016-12-20 16:17 UTC (permalink / raw) To: David Binderman, Josef Bacik Cc: ast@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org On Tue, Dec 20, 2016 at 3:20 AM, David Binderman <dcb314@hotmail.com> wrote: > Hello there, > > I just tried to compile kernel-4.9 with a recent development > version of gcc. It said > > kernel/bpf/verifier.c:1907:23: warning: this statement may fall through [-Wimplicit-fallthrough=] > kernel/bpf/verifier.c:1918:23: warning: this statement may fall through [-Wimplicit-fallthrough=] > kernel/bpf/verifier.c:1859:24: warning: this statement may fall through [-Wimplicit-fallthrough=] > kernel/bpf/verifier.c:1869:24: warning: this statement may fall through [-Wimplicit-fallthrough=] > > Source code for the first one is > > case BPF_JGT: > /* Unsigned comparison, the minimum value is 0. */ > true_reg->min_value = 0; > case BPF_JSGT: > > Suggest either add the missing break or document the fallthrough > with a comment something like /* FALLTHROUGH */ I've tried 4.9 and 5.2 and don't see this warning. Is this 6.x gcc? I suspect it will have such warnings all over the kernel. ^ permalink raw reply [flat|nested] 2+ messages in thread
[parent not found: <VI1PR08MB10228EE1E2FA0EBFEA78DE919C900@VI1PR08MB1022.eurprd08.prod.outlook.com>]
[parent not found: <VI1PR08MB10228EE1E2FA0EBFEA78DE919C900@VI1PR08MB1022.eurprd08.prod.outlook .com>]
* Re: kernel/bpf/verifier.c: 4 * possible unintended fallthrough ? [not found] ` <VI1PR08MB10228EE1E2FA0EBFEA78DE919C900@VI1PR08MB1022.eurprd08.prod.outlook .com> @ 2016-12-20 18:28 ` Josef Bacik 0 siblings, 0 replies; 2+ messages in thread From: Josef Bacik @ 2016-12-20 18:28 UTC (permalink / raw) To: David Binderman Cc: Alexei Starovoitov, ast@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org On Tue, Dec 20, 2016 at 11:34 AM, David Binderman <dcb314@hotmail.com> wrote: > > Hello there, > >> From: Alexei Starovoitov <alexei.starovoitov@gmail.com> >> I've tried 4.9 and 5.2 and don't see this warning. > > As expected - I used a development version of gcc. > Latest released version is 6.2 > >> Is this 6.x gcc? > > 7.0 would be more accurate. > >> I suspect it will have such warnings all over the kernel. > > Indeed it has hundreds, but the subject under discussion is file > kernel/bpf/verifier.c. > > I am still not sure if I have found a fallthrough bug or not. You haven't, this is intended so is a useless warning. Thanks, Josef ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-12-20 18:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <VI1PR08MB102286884ADF02FB45C203109C900@VI1PR08MB1022.eurprd08.prod.outlook.com>
2016-12-20 16:17 ` kernel/bpf/verifier.c: 4 * possible unintended fallthrough ? Alexei Starovoitov
[not found] ` <VI1PR08MB10228EE1E2FA0EBFEA78DE919C900@VI1PR08MB1022.eurprd08.prod.outlook.com>
[not found] ` <VI1PR08MB10228EE1E2FA0EBFEA78DE919C900@VI1PR08MB1022.eurprd08.prod.outlook .com>
2016-12-20 18:28 ` Josef Bacik
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox