Fix some VS 2015 warnings

Fix some warnings when compiling crashpad with VC++ 2015 Update 1.

Warning 4302 occurs if you convert from a pointer to a <sizeof(void*)
integer in one cast, because this often indicates an accidental pointer
truncation which can be a bug in 64-bit builds.

Warning 4577 warns that noexcept will not be enforced, but we don't want
it to be enforced anyway, so I disabled it. The full warning is:

warning C4577: 'noexcept' used with no exception handling mode specified
termination on exception is not guaranteed. Specify /EHsc

BUG=440500
R=mark@chromium.org

Review URL: https://codereview.chromium.org/1527803002 .

Patch from Bruce Dawson <brucedawson@chromium.org>.
This commit is contained in:
Bruce Dawson 2015-12-14 20:01:05 -05:00 committed by Mark Mentovai
parent 583d1dc3ef
commit b0394744cc
2 changed files with 4 additions and 1 deletions

View File

@ -200,8 +200,10 @@ bool PEImageReader::VSFixedFileInfo(
WinVMAddress address;
WinVMSize size;
const uint16_t vs_file_info_type = static_cast<uint16_t>(
reinterpret_cast<uintptr_t>(VS_FILE_INFO)); // RT_VERSION
if (!resource_reader.FindResourceByID(
reinterpret_cast<uint16_t>(VS_FILE_INFO), // RT_VERSION
vs_file_info_type,
VS_VERSION_INFO,
MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL),
&address,

View File

@ -259,6 +259,7 @@
},
'msvs_disabled_warnings': [
4201, # nonstandard extension used : nameless struct/union.
4577, # 'noexcept' used with no exception handling mode specified
],
'conditions': [
['target_arch=="ia32"', {