[PATCHSET] Add support for FALL_THROUGH in switch statements

Jeremy Allison jra at samba.org
Fri Oct 13 15:57:33 UTC 2017


On Fri, Oct 13, 2017 at 05:09:31PM +0200, Andreas Schneider via samba-technical wrote:
> On Friday, 13 October 2017 11:55:10 CEST Andreas Schneider via samba-technical 
> wrote:
> > On Friday, 13 October 2017 11:33:42 CEST Andreas Schneider via
> > samba-technical
> > wrote:
> > > Hi,
> > > 
> > > gcc offers a new flag to detect unwanted "fall through" in switch
> > > statements. The flag is -Wimplicit-fallthrough and we should make use of
> > > it
> > > (if available).
> > > 
> > > To mark a *wanted* fall trough in a switch statement there is an attribute
> > > in gcc now.
> > > 
> > > The attached patchset makes use of it! It also updates socket_wrapper to
> > > version 1.1.8 which got support for FALL_THROUGH first!
> > > 
> > > 
> > > Please review and push if appropriate.
> > 
> > Metze asked to always turn it on in developer mode not only in picky-
> > developer. So the last patch got updated.
> 
> Forgot to bump the socket_wrapper version number. Attached patch does this 
> now.
> 
> 
> Please review.

Not reviewed the other stuff yet, but if you're dumping an amalgamation
of socket_wrapper changes whose real commit messages are elsewhere, then
IMHO it's time to move lib/socket_wrapper to third_party/ and use "import
version XXX" commit messages (I know you're already doing that here, it's
just that moving it to third_party makes it clear it's developed outside
of our source tree).

Jeremy.



More information about the samba-technical mailing list