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

Unified Diff: util/win/process_info.cc

Issue 1357833002: win: Get Crashpad compiling under VS2015 (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: include Created 5 years, 3 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 | « util/win/module_version.cc ('k') | util/win/scoped_process_suspend_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/win/process_info.cc
diff --git a/util/win/process_info.cc b/util/win/process_info.cc
index f7d1c5de839fe94c52dfa3a970e81e44f37dfd00..64fb79b04d2243801aedcfdd7b446d34337911e7 100644
--- a/util/win/process_info.cc
+++ b/util/win/process_info.cc
@@ -68,11 +68,12 @@ bool ReadUnicodeString(HANDLE process,
DCHECK_EQ(us.Length % sizeof(wchar_t), 0u);
result->resize(us.Length / sizeof(wchar_t));
SIZE_T bytes_read;
- if (!ReadProcessMemory(process,
- reinterpret_cast<const void*>(us.Buffer),
- &result->operator[](0),
- us.Length,
- &bytes_read)) {
+ if (!ReadProcessMemory(
+ process,
+ reinterpret_cast<const void*>(static_cast<uintptr_t>(us.Buffer)),
+ &result->operator[](0),
+ us.Length,
+ &bytes_read)) {
PLOG(ERROR) << "ReadProcessMemory UNICODE_STRING";
return false;
}
@@ -198,11 +199,10 @@ bool ReadProcessData(HANDLE process,
// Include the first module in the memory order list to get our the main
// executable's name, as it's not included in initialization order below.
if (!ReadStruct(process,
- reinterpret_cast<WinVMAddress>(
- reinterpret_cast<const char*>(
- peb_ldr_data.InMemoryOrderModuleList.Flink) -
+ static_cast<WinVMAddress>(
+ peb_ldr_data.InMemoryOrderModuleList.Flink) -
offsetof(process_types::LDR_DATA_TABLE_ENTRY<Traits>,
- InMemoryOrderLinks)),
+ InMemoryOrderLinks),
&ldr_data_table_entry)) {
return false;
}
@@ -228,10 +228,9 @@ bool ReadProcessData(HANDLE process,
// to read from the target, and also offset back to the beginning of the
// structure.
if (!ReadStruct(process,
- reinterpret_cast<WinVMAddress>(
- reinterpret_cast<const char*>(cur) -
+ static_cast<WinVMAddress>(cur) -
offsetof(process_types::LDR_DATA_TABLE_ENTRY<Traits>,
- InInitializationOrderLinks)),
+ InInitializationOrderLinks),
&ldr_data_table_entry)) {
break;
}
« no previous file with comments | « util/win/module_version.cc ('k') | util/win/scoped_process_suspend_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698