]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
crimson: silence -Wunused-lambda-capture warnings
authorKefu Chai <kchai@redhat.com>
Fri, 3 Jul 2020 09:29:34 +0000 (17:29 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 3 Jul 2020 16:17:38 +0000 (00:17 +0800)
they are pointed out by clang++.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/crimson/common/gated.h
src/crimson/mgr/client.cc
src/crimson/mon/MonClient.cc

index 679e06b64919d34393f1064de3ded56f2bfa3212..4434b31957f77f55c8d59444d66e7baae3060644 100644 (file)
@@ -25,7 +25,7 @@ class Gated {
   template <typename Func, typename T>
   inline seastar::future<> dispatch(const char* what, T& who, Func&& func) {
     return seastar::with_gate(pending_dispatch, std::forward<Func>(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);
index 74403fc4e955d91fa27a33bcb0f8a7eae3bf6325..4280635d64a06d4f08775c935f4ac81495fea2a9 100644 (file)
@@ -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();
index ca631ed9a0b977e03a68ea972a91832e94c5ed24..99e9d3f2480d6de1667cef5f18b01b6b89584cd4 100644 (file)
@@ -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);