Author: tkreuzer
Date: Sat Feb 14 15:44:44 2015
New Revision: 66266
URL:
http://svn.reactos.org/svn/reactos?rev=66266&view=rev
Log:
[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.
Modified:
trunk/reactos/cmake/msvc.cmake
Modified: trunk/reactos/cmake/msvc.cmake
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/cmake/msvc.cmake?rev=66266…
==============================================================================
--- trunk/reactos/cmake/msvc.cmake [iso-8859-1] (original)
+++ trunk/reactos/cmake/msvc.cmake [iso-8859-1] Sat Feb 14 15:44:44 2015
@@ -35,11 +35,11 @@
# 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