From: Kefu Chai Date: Tue, 17 Aug 2021 06:11:20 +0000 (+0800) Subject: test/crimson: do not discard returned future<> X-Git-Tag: v17.1.0~1097^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F42808%2Fhead;p=ceph.git test/crimson: do not discard returned future<> to silence following warning: ../src/test/crimson/seastore/test_randomblock_manager.cc:122:7: warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result] rbm_manager->add_free_extent(t.allocated_blocks, r.first * DEFAULT_BLOCK_SIZE, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Kefu Chai --- diff --git a/src/test/crimson/seastore/test_randomblock_manager.cc b/src/test/crimson/seastore/test_randomblock_manager.cc index e6e93897e653..8bfa75573172 100644 --- a/src/test/crimson/seastore/test_randomblock_manager.cc +++ b/src/test/crimson/seastore/test_randomblock_manager.cc @@ -115,12 +115,12 @@ struct rbm_test_t : public seastar_test_suite_t, } } - auto free_extent(rbm_transaction &t, interval_set range) { + void free_extent(rbm_transaction &t, interval_set range) { for (auto [off, len] : range) { logger().debug("free_extent: start {} len {}", off * DEFAULT_BLOCK_SIZE, len * DEFAULT_BLOCK_SIZE); rbm_manager->add_free_extent(t.allocated_blocks, off * DEFAULT_BLOCK_SIZE, - len * DEFAULT_BLOCK_SIZE); + len * DEFAULT_BLOCK_SIZE).unsafe_get(); } }