From: Alexander Bokovoy Date: Thu, 6 Sep 2018 09:50:58 +0000 (+0000) Subject: lib/replace/wscript: fix detection of a fallthrough attribute for clang X-Git-Tag: tdb-1.3.17~1715 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=364077d262012af0346afad6d9b9c3999054563f;p=thirdparty%2Fsamba.git lib/replace/wscript: fix detection of a fallthrough attribute for clang clang issues a warning but otherwise allows our test to be compiled and linked. We consider this case a successful pass for a fallthrough attribute detection while it is an error. Turn missing declaration warning into an error so that we actually do not define fallthrough attribute support in case it doesn't really work. Fixes FreeBSD 11.2 with clang. Signed-off-by: Alexander Bokovoy Reviewed-by: Andrew Bartlett --- diff --git a/lib/replace/wscript b/lib/replace/wscript index fa9b837b75f..3d47c375044 100644 --- a/lib/replace/wscript +++ b/lib/replace/wscript @@ -314,6 +314,7 @@ def configure(conf): 'HAVE_FALLTHROUGH_ATTRIBUTE', addmain=False, strict=True, + cflags=['-Werror=missing-declarations'], msg='Checking for fallthrough attribute') # these may be builtins, so we need the link=False strategy