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

Unified Diff: sandbox/win/tests/validation_tests/suite.cc

Issue 786493003: Fix format string to handle pointers correctly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change from static_cast to reinterpret_cast. Created 6 years 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/tests/validation_tests/suite.cc
diff --git a/sandbox/win/tests/validation_tests/suite.cc b/sandbox/win/tests/validation_tests/suite.cc
index 483d6fbff61a05092ede8dc55da729368f761909..35fb5ddc233a92fc09443e9defb66be769df93e0 100644
--- a/sandbox/win/tests/validation_tests/suite.cc
+++ b/sandbox/win/tests/validation_tests/suite.cc
@@ -142,10 +142,12 @@ TEST(ValidationSuite, TestWindows) {
TestRunner runner;
wchar_t command[1024] = {0};
- wsprintf(command, L"ValidWindow %d", ::GetDesktopWindow());
+ wsprintf(command, L"ValidWindow %Id",
+ reinterpret_cast<size_t>(::GetDesktopWindow()));
EXPECT_EQ(SBOX_TEST_DENIED, runner.RunTest(command));
- wsprintf(command, L"ValidWindow %d", ::FindWindow(NULL, NULL));
+ wsprintf(command, L"ValidWindow %Id",
+ reinterpret_cast<size_t>(::FindWindow(NULL, NULL)));
EXPECT_EQ(SBOX_TEST_DENIED, runner.RunTest(command));
}
« 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