wafsamba: Add '-Werror=strict-overflow -Wstrict-overflow=2' to the developer build
authorAndreas Schneider <asn@samba.org>
Thu, 5 Apr 2018 20:33:56 +0000 (13:33 -0700)
committerJeremy Allison <jra@samba.org>
Fri, 6 Apr 2018 00:07:15 +0000 (02:07 +0200)
We could move it to 3, but shouldn't go higher. If you set it to 4 and 5
you will probably also get a lot of false positives.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Apr  6 02:07:16 CEST 2018 on sn-devel-144

buildtools/wafsamba/samba_autoconf.py

index 35f4f36f61c897ea64a02cf850f616ad4a424f21..bdd7c8bd195c047edd8ace1ce231c3cd82554942 100644 (file)
@@ -713,6 +713,8 @@ def SAMBA_CONFIG_H(conf, path=None):
                         testflags=True)
         conf.ADD_CFLAGS('-Wimplicit-fallthrough',
                         testflags=True)
+        conf.ADD_CFLAGS('-Werror=strict-overflow -Wstrict-overflow=2',
+                        testflags=True)
 
         conf.ADD_CFLAGS('-Wformat=2 -Wno-format-y2k', testflags=True)
         conf.ADD_CFLAGS('-Wno-format-zero-length', testflags=True)