diff --git a/tests/flat_mutation_reader_test.cc b/tests/flat_mutation_reader_test.cc index 2a6b040bc5..d1740f091f 100644 --- a/tests/flat_mutation_reader_test.cc +++ b/tests/flat_mutation_reader_test.cc @@ -513,7 +513,7 @@ void test_flat_stream(schema_ptr s, std::vector muts, reversed_partiti if (thread) { auto filter = [&] (const dht::decorated_key& dk) { - for (auto j = 0; j < muts.size(); j += 2) { + for (auto j = size_t(0); j < muts.size(); j += 2) { if (dk.equal(*s, muts[j].decorated_key())) { return false; } @@ -524,7 +524,7 @@ void test_flat_stream(schema_ptr s, std::vector muts, reversed_partiti fmr = flat_mutation_reader_from_mutations(muts); muts2 = fmr.consume_in_thread(flat_stream_consumer(s, reversed), std::move(filter)); BOOST_REQUIRE_EQUAL(muts.size() / 2, muts2.size()); - for (auto j = 1; j < muts.size(); j += 2) { + for (auto j = size_t(1); j < muts.size(); j += 2) { BOOST_REQUIRE_EQUAL(muts[j], muts2[j / 2]); } } @@ -601,7 +601,7 @@ SEASTAR_TEST_CASE(test_make_forwardable) { rd2.fast_forward_to(remaining_range); - for (int i = 1; i < ms.size(); ++i) { + for (auto i = size_t(1); i < ms.size(); ++i) { test(rd2, ms[i]); } }); diff --git a/tests/perf/perf_sstable.hh b/tests/perf/perf_sstable.hh index 38dd2b9f26..0a4069b528 100644 --- a/tests/perf/perf_sstable.hh +++ b/tests/perf/perf_sstable.hh @@ -158,7 +158,7 @@ public: }; std::vector ssts; - for (auto i = 0; i < _cfg.sstables; i++) { + for (auto i = 0u; i < _cfg.sstables; i++) { auto sst = sst_gen(); write_memtable_to_sstable(*_mt, sst).get(); sst->open_data().get(); diff --git a/tests/sstable_datafile_test.cc b/tests/sstable_datafile_test.cc index 0cedce8804..a1f3de4308 100644 --- a/tests/sstable_datafile_test.cc +++ b/tests/sstable_datafile_test.cc @@ -3744,7 +3744,7 @@ SEASTAR_TEST_CASE(test_skipping_using_index) { assertions .produces_partition_start(keys[0]) .fast_forward_to(position_range::all_clustered_rows()); - for (auto i = 0; i < rows_per_part; i++) { + for (auto i = 0u; i < rows_per_part; i++) { assertions.produces_row_with_key(table.make_ckey(i)); } assertions.produces_end_of_stream();