summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhans <hans@chromium.org>2016-02-19 10:48:20 -0800
committerCommit bot <commit-bot@chromium.org>2016-02-19 18:49:13 +0000
commita83fb3a4c55025a39a0ec95ba10504affdc33e95 (patch)
tree4ce9573a3cccdee726f6fe2b187a5d2115e1b27b
parentaec59869aca3417b913e4f57321ca730dcdcb20d (diff)
downloadchromium_src-a83fb3a4c55025a39a0ec95ba10504affdc33e95.zip
chromium_src-a83fb3a4c55025a39a0ec95ba10504affdc33e95.tar.gz
chromium_src-a83fb3a4c55025a39a0ec95ba10504affdc33e95.tar.bz2
chrome_watcher_main.cc: Fix -Wsign-compare error
..\..\chrome\chrome_watcher\chrome_watcher_main.cc(269,23): error: comparison of integers of different signs: 'DWORD' (aka 'unsigned long') and 'int' [-Werror,-Wsign-compare] if (suspend_count != -1) { ~~~~~~~~~~~~~ ^ ~~ BUG=82385 TBR=siggi Review URL: https://codereview.chromium.org/1719443002 Cr-Commit-Position: refs/heads/master@{#376500}
-rw-r--r--chrome/chrome_watcher/chrome_watcher_main.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/chrome/chrome_watcher/chrome_watcher_main.cc b/chrome/chrome_watcher/chrome_watcher_main.cc
index cb35279..2bf2151 100644
--- a/chrome/chrome_watcher/chrome_watcher_main.cc
+++ b/chrome/chrome_watcher/chrome_watcher_main.cc
@@ -266,7 +266,8 @@ void DumpHungBrowserProcess(DWORD main_thread_id,
bool have_context = false;
if (main_thread.IsValid()) {
DWORD suspend_count = ::SuspendThread(main_thread.Get());
- if (suspend_count != -1) {
+ const DWORD kSuspendFailed = static_cast<DWORD>(-1);
+ if (suspend_count != kSuspendFailed) {
// Best effort capture of the context.
thread_context.ContextFlags = CONTEXT_FLOATING_POINT | CONTEXT_SEGMENTS |
CONTEXT_INTEGER | CONTEXT_CONTROL;