From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935339AbcLTQSB (ORCPT ); Tue, 20 Dec 2016 11:18:01 -0500 Received: from mail-lf0-f42.google.com ([209.85.215.42]:33070 "EHLO mail-lf0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754522AbcLTQR4 (ORCPT ); Tue, 20 Dec 2016 11:17:56 -0500 MIME-Version: 1.0 In-Reply-To: References: From: Alexei Starovoitov Date: Tue, 20 Dec 2016 08:17:33 -0800 Message-ID: Subject: Re: kernel/bpf/verifier.c: 4 * possible unintended fallthrough ? To: David Binderman , Josef Bacik Cc: "ast@kernel.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 20, 2016 at 3:20 AM, David Binderman 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.