From 1605785f0bb6138eeea11d8cf35d7caa5c83f0f8 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Sat, 14 Feb 2015 15:44:44 +0000 Subject: [PATCH] [CMAKE] - 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 --- reactos/cmake/msvc.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/reactos/cmake/msvc.cmake b/reactos/cmake/msvc.cmake index e2f654f2578..36248be6648 100644 --- a/reactos/cmake/msvc.cmake +++ b/reactos/cmake/msvc.cmake @@ -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