Merge pull request #41059 from tchaikov/wip-crimson-clang-cleanup

crimson: clean up issues spotted by the clang compiler

Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
This commit is contained in:
Kefu Chai 2021-04-29 00:18:26 +08:00 committed by GitHub
commit e027864990
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 7 additions and 6 deletions

View File

@ -273,7 +273,7 @@ public:
[[gnu::always_inline]]
auto handle_interruption(Func&& func) {
return core_type::then_wrapped(
[this, func=std::move(func),
[func=std::move(func),
interrupt_condition=interrupt_cond<InterruptCond>](auto&& fut) mutable {
if (fut.failed()) {
std::exception_ptr ex = fut.get_exception();

View File

@ -207,7 +207,8 @@ OMapInnerNode::list(
iter_cend(),
list_bare_ret(false, {}),
[=, &start](auto &biter, auto &eiter, auto &ret) {
auto &[complete, result] = ret;
auto &complete = ret.first;
auto &result = ret.second;
return crimson::do_until(
[&, config, oc, this]() -> list_ertr::future<bool> {
if (biter == eiter || result.size() == config.max_result_size) {

View File

@ -49,7 +49,7 @@ FLTreeOnodeManager::get_or_create_onode(
return tree.insert(
trans, hoid,
OnodeTree::tree_value_config_t{sizeof(onode_layout_t)}
).safe_then([this, &trans, &hoid](auto p)
).safe_then([&trans, &hoid](auto p)
-> get_or_create_onode_ret {
auto [cursor, created] = std::move(p);
auto val = OnodeRef(new FLTreeOnode(cursor.value()));

View File

@ -10,7 +10,7 @@
namespace crimson::os::seastore::onode {
struct FLTreeOnode : Onode, Value {
struct FLTreeOnode final : Onode, Value {
static constexpr value_magic_t HEADER_MAGIC = value_magic_t::ONODE;
enum class status_t {

View File

@ -349,7 +349,7 @@ class NodeExtentAccessorT {
}
#ifndef NDEBUG
test_extent->prepare_replay(extent);
test_recorder->template encode_split(split_at, read().p_start());
test_recorder->encode_split(split_at, read().p_start());
#endif
layout_t::split(*mut, read(), split_at);
#ifndef NDEBUG

View File

@ -149,7 +149,7 @@ struct test_item_t {
value_size_t get_payload_size() const {
assert(size > sizeof(value_header_t));
return {static_cast<value_size_t>(size - sizeof(value_header_t))};
return static_cast<value_size_t>(size - sizeof(value_header_t));
}
void initialize(Transaction& t, TestValue& value) const {