From 5a257a02951717089b7fa76bcabeb1bfaab7e22b Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 7 Nov 2014 09:36:16 +0100 Subject: [PATCH] wafsamba: add -Werror=return-type for developer builds MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Jeremy Allison (cherry picked from commit 6ff9388172909ce249fd6254703eee707d821731) --- buildtools/wafsamba/samba_autoconf.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py index f60ce9dc2ba..c1938731164 100644 --- a/buildtools/wafsamba/samba_autoconf.py +++ b/buildtools/wafsamba/samba_autoconf.py @@ -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 -- 2.47.2