HomePhabricator

[compiler-rt][scudo] Fix sign-compare warnings

Authored by jsji on May 24 2021, 2:32 PM.

Description

[compiler-rt][scudo] Fix sign-compare warnings

Fix buildbot failure
https://lab.llvm.org/buildbot/#/builders/57/builds/6542/steps/6/logs/stdio

/llvm-project/llvm/utils/unittest/googletest/include/gtest/gtest.h:1629:28:
error: comparison of integers of different signs: 'const unsigned long'
and 'const int' [-Werror,-Wsign-compare]
GTEST_IMPL_CMP_HELPER_(GT, >);
~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/llvm-project/llvm/utils/unittest/googletest/include/gtest/gtest.h:1609:12:
note: expanded from macro 'GTEST_IMPL_CMP_HELPER_'

if (val1 op val2) {\
    ~~~~ ^  ~~~~

/llvm-project/compiler-rt/lib/scudo/standalone/tests/common_test.cpp:30:3:
note: in instantiation of function template specialization
'testing::internal::CmpHelperGT<unsigned long, int>' requested here

EXPECT_GT(OnStart, 0);
^

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D103029

Details

Committed
jsjiMay 24 2021, 2:33 PM
Reviewer
vitalybuka
Differential Revision
D103029: [compiler-rt][scudo] Fix sign-compare warnings
Parents
rGfc9248877d07: [libc++] Assume that __wrap_iter always wraps a fancy pointer.
Branches
Unknown
Tags
Unknown