From: Björn Jacke Date: Sat, 9 Feb 2019 23:07:57 +0000 (+0100) Subject: waf: fix compiler warnings in configure checks X-Git-Tag: ldb-1.6.1~97 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ba972e90f244089a1bc21f940c4edb75ae4e089;p=thirdparty%2Fsamba.git waf: fix compiler warnings in configure checks the studio compiler issued here: warning: statement not reached Signed-off-by: Bjoern Jacke Reviewed-by: Andreas Schneider --- diff --git a/buildtools/wafsamba/samba_conftests.py b/buildtools/wafsamba/samba_conftests.py index 96345ca00c6..ef632ba9033 100644 --- a/buildtools/wafsamba/samba_conftests.py +++ b/buildtools/wafsamba/samba_conftests.py @@ -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',