[PATCH] Add missing break in ldb

Andreas Schneider asn at samba.org
Mon Mar 5 08:37:26 UTC 2018


On Monday, 5 March 2018 09:12:27 CET Andrew Bartlett via samba-technical 
wrote:
> On Mon, 2018-03-05 at 09:02 +0100, Andreas Schneider wrote:
> > On Monday, 5 March 2018 08:57:55 CET Andrew Bartlett wrote:
> > > On Mon, 2018-03-05 at 08:47 +0100, Andreas Schneider via samba-
> > > 
> > > technical wrote:
> > > > Hi,
> > > > 
> > > > just after my patchset for -Wimplicit-fallthrough landed it already
> > > > reported a new bug!
> > > > 
> > > > If you have gcc 7 or newer running, please make sure to rerun
> > > > configure
> > > > that the flag is detected and turned on!
> > > > 
> > > > 
> > > > Please review and push if OK.
> > > 
> > > EWRONGPATCH?
> > 
> > Yes, correct one attached :-)
> 
> Thanks, that was my bad.  Actually I think we should return
> ldb_operr(ldb).  Ideally we would have some compiler-level way of
> saying this is an invalid/unreachable switch branch but that is a
> little hard in C.
> 
> Thankyou!

So it should be like the following patch?



	Andreas

-- 
Andreas Schneider                   GPG-ID: CC014E3D
Samba Team                             asn at samba.org
www.samba.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ldb-Directly-return-an-error-and-do-not-fall-through.patch
Type: text/x-patch
Size: 917 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20180305/bbccf764/0001-ldb-Directly-return-an-error-and-do-not-fall-through.bin>


More information about the samba-technical mailing list