wafsamba: Add -Werror=old-style-definition
authorAndreas Schneider <asn@samba.org>
Thu, 27 Oct 2022 06:43:39 +0000 (08:43 +0200)
committerJeremy Allison <jra@samba.org>
Thu, 27 Oct 2022 18:18:36 +0000 (18:18 +0000)
See https://fedoraproject.org/wiki/Changes/PortingToModernC

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
buildtools/wafsamba/samba_autoconf.py
third_party/heimdal_build/wscript_configure

index 3ca2f33419010a737440861ce0a1de2a1396ec87..47093dec7c00129a24c3db3e17582070c425e2e9 100644 (file)
@@ -787,6 +787,8 @@ def SAMBA_CONFIG_H(conf, path=None):
                         testflags=True)
         conf.ADD_CFLAGS('-Werror=strict-overflow -Wstrict-overflow=2',
                         testflags=True)
+        conf.ADD_CFLAGS('-Werror=old-style-definition -Wold-style-definition',
+                        testflags=True)
 
         conf.ADD_CFLAGS('-Wformat=2 -Wno-format-y2k', testflags=True)
         conf.ADD_CFLAGS('-Wno-format-zero-length', testflags=True)
index a7000d7e77454cec44cf5e2b14c54560846bfa4f..ee58f7c218218dd218d3feb833ca183eb117a731 100644 (file)
@@ -75,7 +75,8 @@ heimdal_no_error_flags = ['-Wno-error=discarded-qualifiers',
                           '-Wno-error=unused-but-set-variable',
                           '-Wno-error=unused-const-variable',
                           '-Wno-error=unused-variable',
-                          '-Wno-error=unused-result']
+                          '-Wno-error=unused-result',
+                          '-Wno-error=old-style-definition']
 for flag in heimdal_no_error_flags:
     conf.ADD_NAMED_CFLAGS('HEIMDAL_NO_ERROR_CFLAGS',
                           flag,