Silence warning with MSVC.

Fixes:

[2587/4073] Building CXX object projects\compiler-rt\lib\sanitizer_common\CMakeFiles\RTSanitizerCommon.x86_64.dir\sanitizer_stoptheworld_win.cpp.obj
D:\git\llvm-project\compiler-rt\lib\sanitizer_common\sanitizer_stoptheworld_win.cpp(125,33): warning: comparison of integers of different signs: 'DWORD' (aka 'unsigned long') and 'int' [-Wsign-compare]
      if (SuspendThread(thread) == -1) {
          ~~~~~~~~~~~~~~~~~~~~~ ^  ~~
1 warning generated.
This commit is contained in:
Alexandre Ganea 2022-01-15 12:00:58 -05:00
parent 7fcc44bca4
commit 5d5d806e7b
1 changed files with 1 additions and 1 deletions

View File

@ -122,7 +122,7 @@ DWORD WINAPI RunThread(void *argument) {
OpenThread(THREAD_ALL_ACCESS, FALSE, thread_entry.th32ThreadID);
CHECK(thread);
if (SuspendThread(thread) == -1) {
if (SuspendThread(thread) == (DWORD)-1) {
DWORD last_error = GetLastError();
VPrintf(1, "Could not suspend thread %lu (error %lu)",