From 6b43a39518ddb0665201a81adf4d6fdad389c60e Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Fri, 3 Jul 2020 17:29:34 +0800 Subject: [PATCH] crimson: silence -Wunused-lambda-capture warnings they are pointed out by clang++. Signed-off-by: Kefu Chai --- src/crimson/common/gated.h | 2 +- src/crimson/mgr/client.cc | 4 ++-- src/crimson/mon/MonClient.cc | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/crimson/common/gated.h b/src/crimson/common/gated.h index 679e06b6491..4434b31957f 100644 --- a/src/crimson/common/gated.h +++ b/src/crimson/common/gated.h @@ -25,7 +25,7 @@ class Gated { template inline seastar::future<> dispatch(const char* what, T& who, Func&& func) { return seastar::with_gate(pending_dispatch, std::forward(func) - ).handle_exception([this, what, &who] (std::exception_ptr eptr) { + ).handle_exception([what, &who] (std::exception_ptr eptr) { if (*eptr.__cxa_exception_type() == typeid(system_shutdown_exception)) { gated_logger().debug( "{}, {} skipped, system shutdown", who, what); diff --git a/src/crimson/mgr/client.cc b/src/crimson/mgr/client.cc index 74403fc4e95..4280635d64a 100644 --- a/src/crimson/mgr/client.cc +++ b/src/crimson/mgr/client.cc @@ -76,9 +76,9 @@ void Client::ms_handle_connect(crimson::net::ConnectionRef c) }); } -void Client::ms_handle_reset(crimson::net::ConnectionRef c, bool is_replace) +void Client::ms_handle_reset(crimson::net::ConnectionRef c, bool /* is_replace */) { - gate.dispatch_in_background(__func__, *this, [this, c, is_replace] { + gate.dispatch_in_background(__func__, *this, [this, c] { if (conn == c) { report_timer.cancel(); return reconnect(); diff --git a/src/crimson/mon/MonClient.cc b/src/crimson/mon/MonClient.cc index ca631ed9a0b..99e9d3f2480 100644 --- a/src/crimson/mon/MonClient.cc +++ b/src/crimson/mon/MonClient.cc @@ -543,9 +543,9 @@ Client::ms_dispatch(crimson::net::Connection* conn, MessageRef m) }); } -void Client::ms_handle_reset(crimson::net::ConnectionRef conn, bool is_replace) +void Client::ms_handle_reset(crimson::net::ConnectionRef conn, bool /* is_replace */) { - gate.dispatch_in_background(__func__, *this, [this, conn, is_replace] { + gate.dispatch_in_background(__func__, *this, [this, conn] { auto found = std::find_if(pending_conns.begin(), pending_conns.end(), [peer_addr = conn->get_peer_addr()](auto& mc) { return mc->is_my_peer(peer_addr); -- 2.39.5