]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson: do not capture unused variable
authorKefu Chai <kchai@redhat.com>
Tue, 3 Mar 2020 03:10:00 +0000 (11:10 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 3 Mar 2020 03:47:11 +0000 (11:47 +0800)
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 <kchai@redhat.com>
src/crimson/osd/osdmap_gate.cc

index 98d86c1c6567f78383afedfd721f2d486a8ac9a7..573fc8061f3ed6fe6fe2c585eb7ebcf25a9c8c2c 100644 (file)
@@ -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);