]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: Fix implicit capture of this warnings
authorAdam C. Emerson <aemerson@redhat.com>
Tue, 8 Mar 2022 01:26:04 +0000 (20:26 -0500)
committerKefu Chai <tchaikov@gmail.com>
Sat, 30 Jul 2022 05:02:16 +0000 (13:02 +0800)
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
src/rgw/rgw_asio_frontend.cc
src/rgw/rgw_trim_bilog.cc

index dd656a3b963d61a3381f2d3e60ab5bec69a45f30..8f2c8a25b8ebf7db9b8a935c1630df3397a4a641 100644 (file)
@@ -1042,7 +1042,7 @@ int AsioFrontend::run()
   work.emplace(boost::asio::make_work_guard(context));
 
   for (int i = 0; i < thread_count; i++) {
-    threads.emplace_back([=]() noexcept {
+    threads.emplace_back([this]() noexcept {
       // request warnings on synchronous librados calls in this thread
       is_asio_thread = true;
       // Have uncaught exceptions kill the process and give a
index ec657773e76bd90d64f0a82cf877b04b00b62047..6ddda5d6b171f322e8e527d558070ee1b18bdbea 100644 (file)
@@ -920,7 +920,7 @@ int AsyncMetadataList::_send_request(const DoutPrefixProvider *dpp)
     ldpp_dout(dpp, 20) << "starting metadata listing at " << start_marker << dendl;
 
     // release the handle when scope exits
-    auto g = make_scope_guard([=] { mgr->list_keys_complete(handle); });
+    auto g = make_scope_guard([=, this] { mgr->list_keys_complete(handle); });
 
     do {
       // get the next key and marker
@@ -959,7 +959,7 @@ int AsyncMetadataList::_send_request(const DoutPrefixProvider *dpp)
   ldpp_dout(dpp, 20) << "restarting metadata listing" << dendl;
 
   // release the handle when scope exits
-  auto g = make_scope_guard([=] { mgr->list_keys_complete(handle); });
+  auto g = make_scope_guard([=, this] { mgr->list_keys_complete(handle); });
   do {
     // get the next key and marker
     r = mgr->list_keys_next(dpp, handle, 1, keys, &truncated);