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

Unified Diff: sandbox/win/sandbox_poc/pocdll/registry.cc

Issue 542863002: Add more casts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: bleh Created 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/win/sandbox_poc/pocdll/registry.cc
diff --git a/sandbox/win/sandbox_poc/pocdll/registry.cc b/sandbox/win/sandbox_poc/pocdll/registry.cc
index 7394ec4f18ab927f983ce43d6845621ee5a90f6f..d26620d0ca58b90c516d5de4a9a7d1a409fe66b5 100644
--- a/sandbox/win/sandbox_poc/pocdll/registry.cc
+++ b/sandbox/win/sandbox_poc/pocdll/registry.cc
@@ -13,15 +13,15 @@
// The return value is the string corresponding to the hive or "unknown"
const wchar_t *HKEYToString(const HKEY key) {
switch (reinterpret_cast<LONG_PTR>(key)) {
- case HKEY_CLASSES_ROOT:
+ case reinterpret_cast<LONG_PTR>(HKEY_CLASSES_ROOT):
return L"HKEY_CLASSES_ROOT";
- case HKEY_CURRENT_CONFIG:
+ case reinterpret_cast<LONG_PTR>(HKEY_CURRENT_CONFIG):
return L"HKEY_CURRENT_CONFIG";
- case HKEY_CURRENT_USER:
+ case reinterpret_cast<LONG_PTR>(HKEY_CURRENT_USER):
return L"HKEY_CURRENT_USER";
- case HKEY_LOCAL_MACHINE:
+ case reinterpret_cast<LONG_PTR>(HKEY_LOCAL_MACHINE):
return L"HKEY_LOCAL_MACHINE";
- case HKEY_USERS:
+ case reinterpret_cast<LONG_PTR>(HKEY_USERS):
return L"HKEY_USERS";
}
return L"unknown";
@@ -43,7 +43,7 @@ void TryOpenKey(const HKEY hive, const wchar_t *path, FILE *output) {
key);
::RegCloseKey(key);
} else {
- fprintf(output, "[BLOCKED] Opening key \"%S\\%S\". Error %d\r\n",
+ fprintf(output, "[BLOCKED] Opening key \"%S\\%S\". Error %ld\r\n",
HKEYToString(hive),
path,
err_code);
« 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