mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 04:06:12 +00:00
[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
This commit is contained in:
parent
4490614032
commit
1605785f0b
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue