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

Unified Diff: chrome/app/chrome_watcher_command_line_win.cc

Issue 1422773008: Fixing remaining VC++ 2015 64-bit build breaks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Some CR tweaks Created 5 years, 1 month 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: chrome/app/chrome_watcher_command_line_win.cc
diff --git a/chrome/app/chrome_watcher_command_line_win.cc b/chrome/app/chrome_watcher_command_line_win.cc
index 12b3e143629eb6beedcafb0913f5d818e67849dc..af7dc95fc8e98ba85a51f8ebf9725b3e82ea1eaa 100644
--- a/chrome/app/chrome_watcher_command_line_win.cc
+++ b/chrome/app/chrome_watcher_command_line_win.cc
@@ -23,8 +23,11 @@ const char kMainThreadIdSwitch[] = "main-thread-id";
void AppendHandleSwitch(const std::string& switch_name,
HANDLE handle,
base::CommandLine* command_line) {
- command_line->AppendSwitchASCII(
- switch_name, base::UintToString(reinterpret_cast<uint32_t>(handle)));
+ // Cast through uintptr_t and then uint32_t to make the truncation
+ // explicit. Handles are size-of-pointer but are always 32-bit values.
+ command_line->AppendSwitchASCII(switch_name,
+ base::UintToString(static_cast<uint32_t>(
+ reinterpret_cast<uintptr_t>(handle))));
}
uint32_t ReadUintSwitch(const base::CommandLine& command_line,

Powered by Google App Engine
This is Rietveld 408576698