mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-12 19:02:12 +00:00
tests: fix pessimizing moves
Remove pessimizing moves, as reported by gcc 9.
This commit is contained in:
@@ -96,9 +96,9 @@ results test_data_listeners(cql_test_env& e, sstring cf_name) {
|
||||
results res{li->read, li->write};
|
||||
testlog.info("uninstalled listener {}: rd={} wr={}", li, li->read, li->write);
|
||||
db.data_listeners().uninstall(li);
|
||||
return std::move(res);
|
||||
return res;
|
||||
}
|
||||
return std::move(results{});
|
||||
return results{};
|
||||
},
|
||||
results{},
|
||||
[] (results res, results li_res) {
|
||||
|
||||
@@ -86,7 +86,7 @@ data_source prepare_test_skip() {
|
||||
BOOST_REQUIRE_EQUAL(1, buf.size());
|
||||
BOOST_REQUIRE_EQUAL(0, buf[0]);
|
||||
// At this point we have 9 chars buffered in limiting_data_source_impl
|
||||
return std::move(tested);
|
||||
return tested;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -480,7 +480,7 @@ static void test_streamed_mutation_forwarding_guarantees(populate_fn populate) {
|
||||
nullptr,
|
||||
streamed_mutation::forwarding::yes));
|
||||
res.produces_partition_start(m.decorated_key());
|
||||
return std::move(res);
|
||||
return res;
|
||||
};
|
||||
|
||||
auto verify_range = [&] (flat_reader_assertions& sm, int start, int end) {
|
||||
|
||||
@@ -165,7 +165,7 @@ public:
|
||||
, _mutation_source([this] (schema_ptr, const dht::partition_range& range) {
|
||||
auto rd = flat_mutation_reader_from_mutations(_mutations, range);
|
||||
rd.set_max_buffer_size(max_reader_buffer_size);
|
||||
return std::move(rd);
|
||||
return rd;
|
||||
}) {
|
||||
}
|
||||
|
||||
|
||||
@@ -2659,7 +2659,7 @@ SEASTAR_TEST_CASE(test_random_row_population) {
|
||||
auto rd = cache.make_reader(s.schema(), pr, slice ? *slice : s.schema()->full_slice());
|
||||
rd.set_max_buffer_size(1);
|
||||
rd.fill_buffer(db::no_timeout).get();
|
||||
return std::move(rd);
|
||||
return rd;
|
||||
};
|
||||
|
||||
std::vector<query::clustering_range> ranges;
|
||||
@@ -2774,7 +2774,7 @@ SEASTAR_TEST_CASE(test_continuity_is_populated_when_read_overlaps_with_older_ver
|
||||
auto rd = cache.make_reader(s.schema(), pr);
|
||||
rd.set_max_buffer_size(1);
|
||||
rd.fill_buffer(db::no_timeout).get();
|
||||
return std::move(rd);
|
||||
return rd;
|
||||
};
|
||||
|
||||
{
|
||||
@@ -2902,7 +2902,7 @@ SEASTAR_TEST_CASE(test_continuity_population_with_multicolumn_clustering_key) {
|
||||
auto rd = cache.make_reader(s, pr, slice ? *slice : s->full_slice());
|
||||
rd.set_max_buffer_size(1);
|
||||
rd.fill_buffer(db::no_timeout).get();
|
||||
return std::move(rd);
|
||||
return rd;
|
||||
};
|
||||
|
||||
{
|
||||
@@ -3009,7 +3009,7 @@ SEASTAR_TEST_CASE(test_concurrent_setting_of_continuity_on_read_upper_bound) {
|
||||
auto rd = cache.make_reader(s.schema(), pr, slice ? *slice : s.schema()->full_slice());
|
||||
rd.set_max_buffer_size(1);
|
||||
rd.fill_buffer(db::no_timeout).get();
|
||||
return std::move(rd);
|
||||
return rd;
|
||||
};
|
||||
|
||||
{
|
||||
@@ -3073,7 +3073,7 @@ SEASTAR_TEST_CASE(test_tombstone_merging_of_overlapping_tombstones_in_many_versi
|
||||
auto rd = cache.make_reader(s.schema());
|
||||
rd.set_max_buffer_size(1);
|
||||
rd.fill_buffer(db::no_timeout).get();
|
||||
return std::move(rd);
|
||||
return rd;
|
||||
};
|
||||
|
||||
apply(cache, underlying, m1);
|
||||
@@ -3111,7 +3111,7 @@ SEASTAR_TEST_CASE(test_concurrent_reads_and_eviction) {
|
||||
auto rd = cache.make_reader(s, pr, slice);
|
||||
rd.set_max_buffer_size(3);
|
||||
rd.fill_buffer(db::no_timeout).get();
|
||||
return std::move(rd);
|
||||
return rd;
|
||||
};
|
||||
|
||||
const int n_readers = 3;
|
||||
|
||||
@@ -1346,7 +1346,7 @@ SEASTAR_THREAD_TEST_CASE(test_uncompressed_compound_static_row_read) {
|
||||
columns.push_back({s_text_cdef, utf8_type->from_string(text_val)});
|
||||
columns.push_back({s_inet_cdef, inet_addr_type->from_string(inet_val)});
|
||||
|
||||
return std::move(columns);
|
||||
return columns;
|
||||
};
|
||||
|
||||
assert_that(sst.read_rows_flat())
|
||||
@@ -1689,7 +1689,7 @@ static void test_partition_key_with_values_of_different_types_read(const sstring
|
||||
columns.push_back({uuid_cdef, uuid_type->from_string(uuid_val)});
|
||||
columns.push_back({text_cdef, utf8_type->from_string(text_val)});
|
||||
|
||||
return std::move(columns);
|
||||
return columns;
|
||||
};
|
||||
|
||||
assert_that(sst.read_rows_flat())
|
||||
@@ -1857,7 +1857,7 @@ SEASTAR_THREAD_TEST_CASE(test_uncompressed_subset_of_columns_read) {
|
||||
columns.push_back({text_cdef, utf8_type->from_string(*text_val)});
|
||||
}
|
||||
|
||||
return std::move(columns);
|
||||
return columns;
|
||||
};
|
||||
|
||||
assert_that(sst.read_rows_flat())
|
||||
@@ -2863,7 +2863,7 @@ SEASTAR_THREAD_TEST_CASE(test_uncompressed_collections_read) {
|
||||
});
|
||||
});
|
||||
|
||||
return std::move(assertions);
|
||||
return assertions;
|
||||
};
|
||||
|
||||
std::vector<column_id> ids{set_cdef->id, list_cdef->id, map_cdef->id};
|
||||
|
||||
@@ -50,7 +50,7 @@ vector<unsigned> count(const utils::space_saving_top_k<unsigned>::results& res)
|
||||
for (auto& c : res) {
|
||||
v.push_back(c.count);
|
||||
}
|
||||
return std::move(v);
|
||||
return v;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user