From 6468deebad17e05aaab7896df4be155404047533 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Tue, 3 Mar 2020 11:10:00 +0800 Subject: [PATCH] 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 --- src/crimson/osd/osdmap_gate.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crimson/osd/osdmap_gate.cc b/src/crimson/osd/osdmap_gate.cc index 98d86c1c6567f..573fc8061f3ed 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); -- 2.39.5