- Disable warning C4800: forcing value to bool 'true' or 'false' (performance warning). This  is emitted when assigning an integer value to a C++ bool, which is always true (1) or false (0), so assigning an integer to it, will result in an implicit comparison against 0. But "fixing" this warning by adding an explicit comparison ("bool f = (i != 0);") will actually result in LESS efficient code (for whatever reasons). So this warning can be considered entirely useless and counter productive.
- Remove C4018 (signed/unsigned mismatch) from the TODO in the disable list. A comparison between an unsigned and a signed value will very likely result in wrong behavior and can easily cause hard to spot security bugs (e.g. when doing overflow checks). It is also often easy to fix.

svn path=/trunk/; revision=66266
This commit is contained in:
Timo Kreuzer 2015-02-14 15:44:44 +00:00
parent 4490614032
commit 1605785f0b

View file

@ -35,11 +35,11 @@ endif ()
# Disable overly sensitive warnings as well as those that generally aren't
# useful to us.
# - TODO: C4018: signed/unsigned mismatch
# - C4244: implicit integer truncation
# - C4290: C++ exception specification ignored
#add_compile_flags("/wd4018 /wd4244 /wd4290")
add_compile_flags("/wd4290 /wd4244")
# - C4800: forcing value to bool 'true' or 'false' (performance warning)
#add_compile_flags("/wd4244 /wd4290 /wd4800 ")
add_compile_flags("/wd4244 /wd4290 /wd4800")
# The following warnings are treated as errors:
# - C4013: implicit function declaration