[PATCH] Enforce strict overflow checking

Jeremy Allison jra at samba.org
Mon Apr 2 23:58:27 UTC 2018


On Tue, Mar 27, 2018 at 05:05:09PM +0200, Andreas Schneider via samba-technical wrote:
> On Friday, 23 March 2018 16:41:34 CEST Stefan Metzmacher via samba-technical 
> wrote:
> > Thanks! That's much better.
> 
> Attached is an updated version as we released pam_wrapper 1.0.6.
> 
> A private autobuild passed with the patchset already.
> 
> 
> Please review. Thanks!

A quick question on these - why do you have the patch ?

s3:nmbd: Set -Wno-strict-overflow for nmbd if supported

diff --git a/source3/nmbd/wscript_build b/source3/nmbd/wscript_build
index 843c900a4ba..c34deae6083 100644
--- a/source3/nmbd/wscript_build
+++ b/source3/nmbd/wscript_build
@@ -1,5 +1,9 @@
 #!/usr/bin/env python
 
+nmbd_cflags=''
+if bld.CONFIG_SET('HAVE_WNO_STRICT_OVERFLOW'):
+    nmbd_cflags='-Wno-strict-overflow'
+
 bld.SAMBA3_BINARY('nmbd',
                  source='''
                  asyncdns.c
@@ -30,6 +34,7 @@ bld.SAMBA3_BINARY('nmbd',
                  nmbd_workgroupdb.c
                  nmbd_synclists.c
                  ''',
+                 cflags_end=nmbd_cflags,
                  deps='''
                  talloc
                  tevent


If I remove this I still get a clean build (at least
here). Just checking before I finish review.

Cheers,

Jeremy.



More information about the samba-technical mailing list