waf: fix compiler warnings in configure checks
authorBjörn Jacke <bj@sernet.de>
Sat, 9 Feb 2019 23:07:57 +0000 (00:07 +0100)
committerBjoern Jacke <bjacke@samba.org>
Sun, 17 Feb 2019 12:33:14 +0000 (13:33 +0100)
the studio compiler issued here:

warning: statement not reached

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
buildtools/wafsamba/samba_conftests.py

index 96345ca00c6355386e2b40678635c0309cb9c736..ef632ba903369e4211991f17a3b204bcd96c3a2f 100644 (file)
@@ -86,7 +86,7 @@ def CHECK_LARGEFILE(conf, define='HAVE_LARGEFILE'):
     '''see what we need for largefile support'''
     getconf_cflags = conf.CHECK_COMMAND(['getconf', 'LFS_CFLAGS']);
     if getconf_cflags is not False:
-        if (conf.CHECK_CODE('return !(sizeof(off_t) >= 8)',
+        if (conf.CHECK_CODE('if (sizeof(off_t) < 8) return 1',
                             define='WORKING_GETCONF_LFS_CFLAGS',
                             execute=True,
                             cflags=getconf_cflags,
@@ -101,13 +101,13 @@ def CHECK_LARGEFILE(conf, define='HAVE_LARGEFILE'):
                     else:
                         conf.DEFINE(flag_split[0], flag_split[1])
 
-    if conf.CHECK_CODE('return !(sizeof(off_t) >= 8)',
+    if conf.CHECK_CODE('if (sizeof(off_t) < 8) return 1',
                        define,
                        execute=True,
                        msg='Checking for large file support without additional flags'):
         return True
 
-    if conf.CHECK_CODE('return !(sizeof(off_t) >= 8)',
+    if conf.CHECK_CODE('if (sizeof(off_t) < 8) return 1',
                        define,
                        execute=True,
                        cflags='-D_FILE_OFFSET_BITS=64',
@@ -115,7 +115,7 @@ def CHECK_LARGEFILE(conf, define='HAVE_LARGEFILE'):
         conf.DEFINE('_FILE_OFFSET_BITS', 64)
         return True
 
-    if conf.CHECK_CODE('return !(sizeof(off_t) >= 8)',
+    if conf.CHECK_CODE('if (sizeof(off_t) < 8) return 1',
                        define,
                        execute=True,
                        cflags='-D_LARGE_FILES',