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

Unified Diff: base/win/pe_image.cc

Issue 1124763003: Update from https://crrev.com/327068 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: update nacl, buildtools, fix display_change_notifier_unittest Created 5 years, 7 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
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 | « base/win/pe_image.h ('k') | base/win/registry.cc » ('j') | mojo/public/tools/BUILD.gn » ('J')

Powered by Google App Engine
This is Rietveld 408576698