Bug 1135535 part 1 - Suppress C4805 unsafe mix type warnings in js/src and mark that warning an error on MSVC. r=luke

Suppress warnings:
js\src\asmjs/AsmJSModule.cpp(2060) : error C4805: '!=' : unsafe mix of type 'const uint32_t' and type 'bool' in operation
js\src\jit/BaselineDebugModeOSR.cpp(650) : error C4805: '==' : unsafe mix of type 'bool' and type 'js::Debugger::IsObserving' in operation
js\src\jit/BaselineDebugModeOSR.cpp(670) : error C4805: '==' : unsafe mix of type 'bool' and type 'js::Debugger::IsObserving' in operation
js\src\jit/shared/Assembler-x86-shared.h(2434) : error C4805: '|' : unsafe mix of type 'bool' and type 'int' in operation
js\src\vm/Debugger.cpp(2042) : error C4805: '==' : unsafe mix of type 'bool' and type 'js::Debugger::IsObserving' in operation
js\src\vm/Debugger.cpp(2063) : error C4805: '==' : unsafe mix of type 'bool' and type 'js::Debugger::IsObserving' in operation
js\src\vm/ScopeObject.cpp(823) : error C4805: '|' : unsafe mix of type 'int' and type 'bool' in operation
js\src\vm/SPSProfiler.cpp(81) : error C4805: '==' : unsafe mix of type 'uint32_t' and type 'bool' in operation
This commit is contained in:
Xidorn Quan 2015-02-25 15:26:23 +11:00
parent 5ddf815a31
commit c29abd2de8

View File

@ -494,6 +494,10 @@ if CONFIG['_MSC_VER']:
# Prevent floating point errors caused by VC++ optimizations
# XXX We should add this to CXXFLAGS, too?
CFLAGS += ['-fp:precise']
# C4805 warns mixing bool with other integral types in computation.
# But given the conversion from bool is specified, and this is a
# pattern widely used in code in js/src, suppress this warning here.
CXXFLAGS += ['-wd4805']
if CONFIG['OS_ARCH'] not in ('WINNT', 'HP-UX'):
OS_LIBS += [