From: Adam C. Emerson Date: Tue, 8 Mar 2022 01:26:04 +0000 (-0500) Subject: rgw: Fix implicit capture of this warnings X-Git-Tag: v18.0.0~366^2~8 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=83f959b6bc51adb77537180d6f4dcb67d6fbb899;p=ceph.git rgw: Fix implicit capture of this warnings Signed-off-by: Adam C. Emerson --- diff --git a/src/rgw/rgw_asio_frontend.cc b/src/rgw/rgw_asio_frontend.cc index dd656a3b963..8f2c8a25b8e 100644 --- a/src/rgw/rgw_asio_frontend.cc +++ b/src/rgw/rgw_asio_frontend.cc @@ -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 diff --git a/src/rgw/rgw_trim_bilog.cc b/src/rgw/rgw_trim_bilog.cc index ec657773e76..6ddda5d6b17 100644 --- a/src/rgw/rgw_trim_bilog.cc +++ b/src/rgw/rgw_trim_bilog.cc @@ -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);