Index: snapshot/win/pe_image_reader.cc |
diff --git a/snapshot/win/pe_image_reader.cc b/snapshot/win/pe_image_reader.cc |
index 9abf0b139d4dce25cdeaae8e2a2372d16e6d3658..f63f71230147cab2404b0113694dae797d8735f4 100644 |
--- a/snapshot/win/pe_image_reader.cc |
+++ b/snapshot/win/pe_image_reader.cc |
@@ -200,8 +200,13 @@ bool PEImageReader::VSFixedFileInfo( |
WinVMAddress address; |
WinVMSize size; |
+ // Do two casts to make it explicit that we are intentionally both converting |
Mark Mentovai
2015/12/14 23:51:30
I don’t think the comment is necessary. Weird cast
brucedawson
2015/12/15 00:00:56
Done.
|
+ // from pointer to int, and doing a truncation. This avoids a VC++ 2015 |
+ // warning. |
+ const uint16_t type = |
Mark Mentovai
2015/12/14 23:51:30
but I’d name it vs_file_info_type.
brucedawson
2015/12/15 00:00:56
Done.
|
+ static_cast<uint16_t>(reinterpret_cast<uintptr_t>(VS_FILE_INFO)); |
if (!resource_reader.FindResourceByID( |
- reinterpret_cast<uint16_t>(VS_FILE_INFO), // RT_VERSION |
+ type, // RT_VERSION |
VS_VERSION_INFO, |
MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), |
&address, |