From: Kefu Chai Date: Tue, 3 Mar 2020 03:10:00 +0000 (+0800) Subject: crimson: do not capture unused variable X-Git-Tag: v15.1.1~156^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6468deebad17e05aaab7896df4be155404047533;p=ceph.git crimson: do not capture unused variable this silences the warning of: ``` ../src/crimson/osd/osdmap_gate.cc:48:38: warning: lambda capture 'this' is not used [-Wunused-lambda-capture] std::for_each(first, last, [epoch, this](auto& blocked_requests) { ~~^~~~ ``` Signed-off-by: Kefu Chai --- diff --git a/src/crimson/osd/osdmap_gate.cc b/src/crimson/osd/osdmap_gate.cc index 98d86c1c6567..573fc8061f3e 100644 --- a/src/crimson/osd/osdmap_gate.cc +++ b/src/crimson/osd/osdmap_gate.cc @@ -45,7 +45,7 @@ void OSDMapGate::got_map(epoch_t epoch) { current = epoch; auto first = waiting_peering.begin(); auto last = waiting_peering.upper_bound(epoch); - std::for_each(first, last, [epoch, this](auto& blocked_requests) { + std::for_each(first, last, [epoch](auto& blocked_requests) { blocked_requests.second.promise.set_value(epoch); }); waiting_peering.erase(first, last);