Skip to content

Commit 98e4f48

Browse files
committed
resolve a few more warnings
1 parent f9e907a commit 98e4f48

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

test/inc/zoo/debug/rh/RobinHood.debug.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ auto satisfiesInvariant(const Table &map, std::size_t begin = 0, std::size_t end
8787
for(auto n = Table::MD::NSlots; n--; ) {
8888
auto current = v.at(0);
8989
if(prior + 1 < current) {
90-
std::size_t index = swarIndexBegin * Table::MD::NSlots + Table::MD::NSlots - n - 1;
90+
const std::size_t index = swarIndexBegin * Table::MD::NSlots + Table::MD::NSlots - n - 1;
9191
return std::tuple(false, index);
9292
}
9393
v = v.shiftLanesRight(1);

test/map/RobinHood.test.cpp

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ std::ostream &operator<<(std::ostream &out, V v) {
6161
if(v.intraIndex == ndx) {
6262
ptr += snprintf(ptr, bufferSize, "<");
6363
}
64-
ptr += snprintf(ptr, bufferSize, "%02lx", val & 0xFF);
64+
const std::size_t va = val & 0xFF;
65+
ptr += snprintf(ptr, bufferSize, "%02lx", va);
6566
if(v.intraIndex == ndx) {
6667
ptr += snprintf(ptr, bufferSize, ">");
6768
}
@@ -143,7 +144,7 @@ TEST_CASE("Robin Hood", "[api][mapping][swar][robin-hood]") {
143144
}
144145
return true;
145146
};
146-
147+
147148
std::regex words("\\w+");
148149
std::sregex_iterator
149150
wordsEnd{},
@@ -227,7 +228,7 @@ TEST_CASE("Robin Hood Metadata peek/poke u32 synthetic metadata basic",
227228
CHECK(std::tuple{0,0} == zoo::rh::impl::peek(table.md_, 0));
228229
CHECK(std::tuple{0,0} == zoo::rh::impl::peek(table.md_, 2));
229230

230-
// If we ask for a skarupke tail
231+
// If we ask for a skarupke tail
231232
FrontendSmall32::Backend be{table.md_.data()};
232233
auto [index, deadline, metadata] =
233234
be.findMisaligned_assumesSkarupkeTail(0x7, 1, [](int i) {return true;});
@@ -331,7 +332,7 @@ TEST_CASE("Robin Hood Metadata peek/poke u32 synthetic metadata psl one",
331332
CHECK(i+1 == missIndex);
332333
CHECK((missIndex)%4 ==
333334
FrontendSmall32::MD{missDeadline}.lsbIndex());
334-
CHECK(0x02 ==
335+
CHECK(0x02 ==
335336
missMetadata.at(FrontendSmall32::MD{missDeadline}.lsbIndex()));
336337
}
337338
{
@@ -375,7 +376,7 @@ TEST_CASE("Robin Hood Metadata peek/poke u32 synthetic metadata psl not one",
375376
CHECK(i-p+4 == missIndex);
376377
CHECK((missIndex)%4 ==
377378
FrontendSmall32::MD{missDeadline}.lsbIndex());
378-
CHECK(0x04 ==
379+
CHECK(0x04 ==
379380
missMetadata.at(FrontendSmall32::MD{missDeadline}.lsbIndex()));
380381
}
381382
}
@@ -449,7 +450,7 @@ TEST_CASE(
449450
m.data_ = MD35u32Ops::SSL{0x0401'8201};
450451
CHECK(0x0000'8001u == m.attemptMatch(SM{hash1}, SM{psl1}).value());
451452
CHECK(0x0000'8001u == SO35u32Ops::attemptMatch(m.data_, SM{hash1}, SM{psl1}).value());
452-
}
453+
}
453454
}
454455

455456
template<typename Container>
@@ -485,7 +486,7 @@ TEST_CASE("RH Validation") {
485486

486487
while(corpus) {
487488
getline(corpus, line);
488-
489+
489490
std::sregex_iterator
490491
wordsEnd{},
491492
wordIterator{line.begin(), line.end(), words};

0 commit comments

Comments
 (0)