[scudo] Fix inconsistent signed/unsigned comparison
authorChia-hung Duan <chiahungduan@google.com>
Wed, 15 Feb 2023 18:26:24 +0000 (18:26 +0000)
committerChia-hung Duan <chiahungduan@google.com>
Wed, 15 Feb 2023 19:14:17 +0000 (19:14 +0000)
Fix broken test on PPC

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

compiler-rt/lib/scudo/standalone/tests/scudo_hooks_test.cpp

index cf69f37..7184ec1 100644 (file)
@@ -76,7 +76,7 @@ TEST(ScudoHooksTest, AllocateHooks) {
 
     EXPECT_EQ(Ptr, NewPtr);
     EXPECT_EQ(nullptr, LastAllocatedPtr);
-    EXPECT_EQ(0, LastRequestSize);
+    EXPECT_EQ(0U, LastRequestSize);
     EXPECT_EQ(nullptr, LastDeallocatedPtr);
   }
 
@@ -104,7 +104,7 @@ TEST(ScudoHooksTest, AllocateHooks) {
         EXPECT_EQ(Ptr, LastDeallocatedPtr);
       } else {
         EXPECT_EQ(nullptr, LastAllocatedPtr);
-        EXPECT_EQ(0, LastRequestSize);
+        EXPECT_EQ(0U, LastRequestSize);
         EXPECT_EQ(nullptr, LastDeallocatedPtr);
       }