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

Unified Diff: sandbox/win/src/eat_resolver.cc

Issue 1119783002: vs2015: fix narrowing warnings in sandbox/win/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2015-printing-emf
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 | « sandbox/win/src/broker_services.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/win/src/eat_resolver.cc
diff --git a/sandbox/win/src/eat_resolver.cc b/sandbox/win/src/eat_resolver.cc
index 328ee00f2f171f3b43d6371badd6f084bbf692bd..1675ce84eb02172e8488de77ae344c4835dff8f2 100644
--- a/sandbox/win/src/eat_resolver.cc
+++ b/sandbox/win/src/eat_resolver.cc
@@ -45,12 +45,8 @@ NTSTATUS EatResolverThunk::Setup(const void* target_module,
return ret;
// Perform the patch.
-#pragma warning(push)
-#pragma warning(disable: 4311)
- // These casts generate warnings because they are 32 bit specific.
- *eat_entry_ = reinterpret_cast<DWORD>(thunk_storage) -
- reinterpret_cast<DWORD>(target_module);
-#pragma warning(pop)
+ *eat_entry_ = static_cast<DWORD>(reinterpret_cast<uintptr_t>(thunk_storage)) -
+ static_cast<DWORD>(reinterpret_cast<uintptr_t>(target_module));
if (NULL != storage_used)
*storage_used = GetThunkSize();
« no previous file with comments | « sandbox/win/src/broker_services.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698