[compiler-rt] f5bde3d - [NFC][scudo] Avoid cast in test
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Mon May 24 17:14:51 PDT 2021
Author: Vitaly Buka
Date: 2021-05-24T17:14:38-07:00
New Revision: f5bde3d476c2c6aee4f126d84982e8d2f0f7e408
URL: https://github.com/llvm/llvm-project/commit/f5bde3d476c2c6aee4f126d84982e8d2f0f7e408
DIFF: https://github.com/llvm/llvm-project/commit/f5bde3d476c2c6aee4f126d84982e8d2f0f7e408.diff
LOG: [NFC][scudo] Avoid cast in test
Added:
Modified:
compiler-rt/lib/scudo/standalone/tests/common_test.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/scudo/standalone/tests/common_test.cpp b/compiler-rt/lib/scudo/standalone/tests/common_test.cpp
index f8c64b29a183..832f01da3905 100644
--- a/compiler-rt/lib/scudo/standalone/tests/common_test.cpp
+++ b/compiler-rt/lib/scudo/standalone/tests/common_test.cpp
@@ -37,9 +37,9 @@ TEST(ScudoCommonTest, SKIP_ON_FUCHSIA(ResidentMemorySize)) {
MapPlatformData Data = {};
uptr *P = reinterpret_cast<uptr *>(
map(nullptr, Size, "ResidentMemorySize", 0, &Data));
- const size_t N = Size / sizeof(*P);
+ const ptr
diff _t N = Size / sizeof(*P);
ASSERT_NE(nullptr, P);
- EXPECT_EQ((size_t)std::count(P, P + N, 0), N);
+ EXPECT_EQ(std::count(P, P + N, 0), N);
EXPECT_LT(getResidentMemorySize() - OnStart, Threshold);
memset(P, 1, Size);
@@ -47,7 +47,7 @@ TEST(ScudoCommonTest, SKIP_ON_FUCHSIA(ResidentMemorySize)) {
EXPECT_LT(getResidentMemorySize() - Size, Threshold);
releasePagesToOS((uptr)P, 0, Size, &Data);
- EXPECT_EQ((size_t)std::count(P, P + N, 0), N);
+ EXPECT_EQ(std::count(P, P + N, 0), N);
// FIXME: does not work with QEMU-user.
// EXPECT_LT(getResidentMemorySize() - OnStart, Threshold);
More information about the llvm-commits
mailing list