lib/replace/wscript: fix detection of a fallthrough attribute for clang
authorAlexander Bokovoy <ab@samba.org>
Thu, 6 Sep 2018 09:50:58 +0000 (09:50 +0000)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 7 Sep 2018 09:37:23 +0000 (11:37 +0200)
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 <ab@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
lib/replace/wscript

index fa9b837b75f66e64e336fe839a8fe273245e6e08..3d47c37504470e96471ba59dc1bdd750161b5e57 100644 (file)
@@ -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