Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1272)

Unified Diff: base/win/pe_image.cc

Issue 1091433002: Suppress VS 2015 pointer truncation warning. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/win/pe_image.cc
diff --git a/base/win/pe_image.cc b/base/win/pe_image.cc
index e226b6a67072025c0e090ef22db9d421b7fdcd30..19b381d6fe6da271a0c2b02e52ac528bb0928889 100644
--- a/base/win/pe_image.cc
+++ b/base/win/pe_image.cc
@@ -568,14 +568,12 @@ bool PEImage::ImageAddrToOnDiskOffset(LPVOID address,
if (NULL == section_header)
return false;
-#pragma warning(push)
-#pragma warning(disable: 4311)
+#pragma warning(suppress : 4302) // pointer truncation
// These casts generate warnings because they are 32 bit specific.
// Don't follow the virtual RVAToAddr, use the one on the base.
DWORD offset_within_section = reinterpret_cast<DWORD>(address) -
reinterpret_cast<DWORD>(PEImage::RVAToAddr(
section_header->VirtualAddress));
-#pragma warning(pop)
*on_disk_offset = section_header->PointerToRawData + offset_within_section;
return true;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698