]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
wafsamba: add -Werror=return-type for developer builds
authorStefan Metzmacher <metze@samba.org>
Fri, 7 Nov 2014 08:36:16 +0000 (09:36 +0100)
committerKarolin Seeger <kseeger@samba.org>
Tue, 27 Jan 2015 10:02:15 +0000 (11:02 +0100)
This avoids errors like this:

 ../source3/utils/status.c: In function ‘print_share_mode’:
 ../source3/utils/status.c:126:3: error: ‘return’ with no value, in function
 returning non-void [-Werror=return-type]
   return;

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 6ff9388172909ce249fd6254703eee707d821731)

buildtools/wafsamba/samba_autoconf.py

index f60ce9dc2ba7d40f09812ee517fd97ce4d0a61b6..c1938731164db40efc52895b80aa42c4ff287f3b 100644 (file)
@@ -671,6 +671,8 @@ def SAMBA_CONFIG_H(conf, path=None):
                         testflags=True)
         conf.ADD_CFLAGS('-Werror=declaration-after-statement -Wdeclaration-after-statement',
                         testflags=True)
+        conf.ADD_CFLAGS('-Werror=return-type -Wreturn-type',
+                        testflags=True)
 
         conf.ADD_CFLAGS('-Wformat=2 -Wno-format-y2k', testflags=True)
         # This check is because for ldb_search(), a NULL format string