From owner-svn-src-head@freebsd.org Wed May 9 21:21:51 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D54F7FCC995; Wed, 9 May 2018 21:21:51 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5505E7256A; Wed, 9 May 2018 21:21:51 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (ralph.baldwin.cx [66.234.199.215]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 1DFA0CD94; Wed, 9 May 2018 21:21:51 +0000 (UTC) (envelope-from jhb@freebsd.org) From: John Baldwin To: Warner Losh Cc: Cy Schubert , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r333393 - head/sys/contrib/ipfilter/netinet Date: Wed, 09 May 2018 14:13:37 -0700 Message-ID: <1843086.zoJA0hnD5f@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.1-STABLE; KDE/4.14.30; amd64; ; ) In-Reply-To: References: <201805090207.w49279t8006603@repo.freebsd.org> <1872360.cC9XDcqkuS@ralph.baldwin.cx> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 May 2018 21:21:52 -0000 On Wednesday, May 09, 2018 02:29:05 PM Warner Losh wrote: > On Wed, May 9, 2018 at 10:52 AM, John Baldwin wrote: > > > On Wednesday, May 09, 2018 10:02:06 AM Warner Losh wrote: > > > On Wed, May 9, 2018 at 8:58 AM, John Baldwin wrote: > > > > > > > On Wednesday, May 09, 2018 02:07:09 AM Cy Schubert wrote: > > > > > Author: cy > > > > > Date: Wed May 9 02:07:09 2018 > > > > > New Revision: 333393 > > > > > URL: https://svnweb.freebsd.org/changeset/base/333393 > > > > > > > > > > Log: > > > > > Document intentional fallthrough. (CID 976535) > > > > > > > > > > MFC after: 1 week > > > > > > > > > > Modified: > > > > > head/sys/contrib/ipfilter/netinet/fil.c > > > > > > > > > > Modified: head/sys/contrib/ipfilter/netinet/fil.c > > > > > ============================================================ > > > > ================== > > > > > --- head/sys/contrib/ipfilter/netinet/fil.c Wed May 9 02:02:58 > > 2018 > > > > (r333392) > > > > > +++ head/sys/contrib/ipfilter/netinet/fil.c Wed May 9 02:07:09 > > 2018 > > > > (r333393) > > > > > @@ -1299,6 +1299,7 @@ ipf_pr_icmp(fin) > > > > > } > > > > > } > > > > > #endif > > > > > + /* fallthrough is intentional */ > > > > > case ICMP_SOURCEQUENCH : > > > > > case ICMP_REDIRECT : > > > > > case ICMP_TIMXCEED : > > > > > > > > Hmm, normal FreeBSD style here is to use /* FALLTHROUGH */, and there > > are > > > > three other instances of that style in ipfilter already (and none > > others > > > > using this comment style). > > > > > > > > > > /* FALLTHROUGH */ is actually an old-school lint directive that other > > tools > > > have picked up. > > > > Yes, but it is still the dominant style in the tree even if it has come > > from > > lint. > > > > Agreed. I wasn't arguing, just saying it has a long history and everybody > does it today even though lint's relevance has faded. I do think that clang and gcc will look for 'fallthrough' (case insensitive) for their built-in warnings. C has also added a [[fallthrough]] attribute apparently? -- John Baldwin