diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2018-10-03 17:27:22 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2018-10-03 17:34:56 +0200 |
commit | dec20a987b40e7625b38e520cc223723da9bae2a (patch) | |
tree | aa4dd74cddaafcea72ae62d24c0a58c255bcd9d2 /SConstruct | |
parent | 95131e6f23c1c5a475812afa295803c191dead7f (diff) |
Fix some warnings raised by MSVC 2017
Disabled signed/unsigned warnings like for GCC/Clang
(warning C4018: '>=': signed/unsigned mismatch).
Fixes the following MSVC 2017 warnings:
```
core\image.cpp(999): warning C4804: '>': unsafe use of type 'bool' in operation
core\io\compression.cpp(178): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
editor\doc\doc_dump.cpp(226): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
scene/resources/material.h(289): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
scene/resources/material.h(298): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
editor\editor_themes.cpp(379): warning C4805: '==': unsafe mix of type 'int' and type 'bool' in operation
```
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/SConstruct b/SConstruct index 1898e0b5d3..f1587e0280 100644 --- a/SConstruct +++ b/SConstruct @@ -322,13 +322,13 @@ if selected_platform in platform_list: print("WARNING: warnings=yes is deprecated; assuming warnings=all") if env.msvc: - disable_nonessential_warnings = ['/wd4267', '/wd4244', '/wd4305', '/wd4800'] # Truncations, narrowing conversions... + # Truncations, narrowing conversions, signed/unsigned comparisons... + disable_nonessential_warnings = ['/wd4267', '/wd4244', '/wd4305', '/wd4018', '/wd4800'] if (env["warnings"] == 'extra'): env.Append(CCFLAGS=['/Wall']) # Implies /W4 elif (env["warnings"] == 'all' or env["warnings"] == 'yes'): env.Append(CCFLAGS=['/W3'] + disable_nonessential_warnings) elif (env["warnings"] == 'moderate'): - # C4244 shouldn't be needed here being a level-3 warning, but it is env.Append(CCFLAGS=['/W2'] + disable_nonessential_warnings) else: # 'no' env.Append(CCFLAGS=['/w']) |