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

Unified Diff: base/profiler/native_stack_sampler_win.cc

Issue 1507413003: clang/win: Let some chromium_code targets build with -Wextra. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: content_browsertests Created 5 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 | « base/process/process_util_unittest.cc ('k') | base/strings/utf_string_conversions_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/profiler/native_stack_sampler_win.cc
diff --git a/base/profiler/native_stack_sampler_win.cc b/base/profiler/native_stack_sampler_win.cc
index 87bb6ce417560ae218771d9855e3f47c5a20f288..089b158f7480520ecfbf4b1adf8f39b6803a106e 100644
--- a/base/profiler/native_stack_sampler_win.cc
+++ b/base/profiler/native_stack_sampler_win.cc
@@ -245,8 +245,8 @@ class ScopedSuspendThread {
ScopedSuspendThread::ScopedSuspendThread(HANDLE thread_handle)
: thread_handle_(thread_handle),
- was_successful_(::SuspendThread(thread_handle) != -1) {
-}
+ was_successful_(::SuspendThread(thread_handle) !=
+ static_cast<DWORD>(-1)) {}
ScopedSuspendThread::~ScopedSuspendThread() {
if (!was_successful_)
@@ -263,7 +263,8 @@ ScopedSuspendThread::~ScopedSuspendThread() {
// before priority boost is reenabled. The measured length of this window is
// ~100us, so this should occur fairly rarely.
ScopedDisablePriorityBoost disable_priority_boost(thread_handle_);
- bool resume_thread_succeeded = ::ResumeThread(thread_handle_) != -1;
+ bool resume_thread_succeeded =
+ ::ResumeThread(thread_handle_) != static_cast<DWORD>(-1);
CHECK(resume_thread_succeeded) << "ResumeThread failed: " << GetLastError();
}
« no previous file with comments | « base/process/process_util_unittest.cc ('k') | base/strings/utf_string_conversions_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698