Skip to content

Commit 8755d24

Browse files
committed
[compiler-rt][ctx_profile] Fix signed-ness warnings in test
Follow-up from PR ##89838. Some build bots warn-as-error about signed/unsigned comparison in CtxInstrProfilingTest. Example: https://lab.llvm.org/buildbot/#/builders/37/builds/34610
1 parent a99ce61 commit 8755d24

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

compiler-rt/lib/ctx_profile/tests/CtxInstrProfilingTest.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -178,19 +178,19 @@ TEST_F(ContextTest, Dump) {
178178

179179
bool write(const ContextNode &Node) {
180180
EXPECT_FALSE(Root->Taken.TryLock());
181-
EXPECT_EQ(Node.guid(), 1);
181+
EXPECT_EQ(Node.guid(), 1U);
182182
EXPECT_EQ(Node.counters()[0], Entries);
183-
EXPECT_EQ(Node.counters_size(), 10);
184-
EXPECT_EQ(Node.callsites_size(), 4);
183+
EXPECT_EQ(Node.counters_size(), 10U);
184+
EXPECT_EQ(Node.callsites_size(), 4U);
185185
EXPECT_EQ(Node.subContexts()[0], nullptr);
186186
EXPECT_EQ(Node.subContexts()[1], nullptr);
187187
EXPECT_NE(Node.subContexts()[2], nullptr);
188188
EXPECT_EQ(Node.subContexts()[3], nullptr);
189189
const auto &SN = *Node.subContexts()[2];
190-
EXPECT_EQ(SN.guid(), 2);
190+
EXPECT_EQ(SN.guid(), 2U);
191191
EXPECT_EQ(SN.counters()[0], Entries);
192-
EXPECT_EQ(SN.counters_size(), 3);
193-
EXPECT_EQ(SN.callsites_size(), 1);
192+
EXPECT_EQ(SN.counters_size(), 3U);
193+
EXPECT_EQ(SN.callsites_size(), 1U);
194194
EXPECT_EQ(SN.subContexts()[0], nullptr);
195195
State = true;
196196
return true;

0 commit comments

Comments
 (0)