diff options
author | hans <hans@chromium.org> | 2016-02-19 10:48:20 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-02-19 18:49:13 +0000 |
commit | a83fb3a4c55025a39a0ec95ba10504affdc33e95 (patch) | |
tree | 4ce9573a3cccdee726f6fe2b187a5d2115e1b27b | |
parent | aec59869aca3417b913e4f57321ca730dcdcb20d (diff) | |
download | chromium_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.cc | 3 |
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; |