]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cleanup: Remove unused variables/captures 21861/head
authorAdam C. Emerson <aemerson@redhat.com>
Mon, 7 May 2018 17:41:31 +0000 (13:41 -0400)
committerAdam C. Emerson <aemerson@redhat.com>
Tue, 8 May 2018 17:57:58 +0000 (13:57 -0400)
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
src/mon/ConfigMonitor.cc
src/mon/MDSMonitor.cc
src/test/librbd/test_mock_ManagedLock.cc
src/test/mon/test_mon_types.cc
src/tools/rbd_mirror/PoolReplayer.cc

index c2627c076011ec32264deb5eefe61c78f3c047f3..820b961b035b0793446ebaa77b0a9d16b63c1e10 100644 (file)
@@ -815,7 +815,7 @@ void ConfigMonitor::check_sub(Subscription *sub)
   if (sub->next <= version) {
     maybe_send_config(sub->session);
     if (sub->onetime) {
-      mon->with_session_map([this, sub](MonSessionMap& session_map) {
+      mon->with_session_map([sub](MonSessionMap& session_map) {
          session_map.remove_sub(sub);
        });
     } else {
index 993913d00e465d20e5e7541b55bd170d01cf331e..5cc4104f26aba1e1bacce11a1fe6c5feb003f647 100644 (file)
@@ -606,7 +606,6 @@ bool MDSMonitor::prepare_beacon(MonOpRequestRef op)
           info.standby_for_name);
       if (leaderinfo && (leaderinfo->rank >= 0)) {
         const auto &fscid = pending.mds_roles.at(leaderinfo->global_id);
-        const auto &fs = pending.get_filesystem(fscid);
 
         pending.modify_daemon(gid, [fscid, leaderinfo](
               MDSMap::mds_info_t *info) {
index 1a841b4c690d707cbf5e928f66cb6249a1fe229c..d6b8f5955637a419bd6a398b4f64a680bc6bbe46 100644 (file)
@@ -208,7 +208,7 @@ public:
                         MockMockManagedLock &managed_lock, uint64_t &client_id) {
     expect_get_watch_handle(watcher);
     EXPECT_CALL(managed_lock, post_reacquire_lock_handler(_, _))
-      .WillOnce(Invoke([&watcher, &client_id](int r, Context *on_finish){
+      .WillOnce(Invoke([&client_id](int r, Context *on_finish){
         if (r >= 0) {
           client_id = 98765;
         }
index 3ffb49dbccd87f9e40a9ab3321bfc176773183fa..e9997f14f2e226b45010489625129d274fc95ff9 100644 (file)
@@ -76,7 +76,6 @@ TEST(mon_features, binary_ops) {
 
 TEST(mon_features, set_funcs) {
 
-  mon_feature_t FEATURE_NONE(0ULL);
   mon_feature_t FEATURE_A((1ULL << 1));
   mon_feature_t FEATURE_B((1ULL << 2));
   mon_feature_t FEATURE_C((1ULL << 3));
index 90d04868a4a5ac08994e489beffc0c804d99cdab..8f13b4f4e147abbfc17f7fb572f96e115454b9c7 100644 (file)
@@ -740,7 +740,7 @@ void PoolReplayer<I>::handle_init_image_map(int r, Context *on_finish) {
   dout(5) << "r=" << r << dendl;
   if (r < 0) {
     derr << "failed to init image map: " << cpp_strerror(r) << dendl;
-    on_finish = new FunctionContext([this, on_finish, r](int) {
+    on_finish = new FunctionContext([on_finish, r](int) {
         on_finish->complete(r);
       });
     shut_down_image_map(on_finish);
@@ -774,7 +774,7 @@ void PoolReplayer<I>::handle_init_local_pool_watcher(
   dout(10) << "r=" << r << dendl;
   if (r < 0) {
     derr << "failed to retrieve local images: " << cpp_strerror(r) << dendl;
-    on_finish = new FunctionContext([this, on_finish, r](int) {
+    on_finish = new FunctionContext([on_finish, r](int) {
         on_finish->complete(r);
       });
     shut_down_pool_watchers(on_finish);
@@ -806,7 +806,7 @@ void PoolReplayer<I>::handle_init_remote_pool_watcher(
   dout(10) << "r=" << r << dendl;
   if (r < 0) {
     derr << "failed to retrieve remote images: " << cpp_strerror(r) << dendl;
-    on_finish = new FunctionContext([this, on_finish, r](int) {
+    on_finish = new FunctionContext([on_finish, r](int) {
         on_finish->complete(r);
       });
     shut_down_pool_watchers(on_finish);
@@ -837,7 +837,7 @@ void PoolReplayer<I>::handle_init_image_deleter(int r, Context *on_finish) {
   dout(10) << "r=" << r << dendl;
   if (r < 0) {
     derr << "failed to init image deleter: " << cpp_strerror(r) << dendl;
-    on_finish = new FunctionContext([this, on_finish, r](int) {
+    on_finish = new FunctionContext([on_finish, r](int) {
         on_finish->complete(r);
       });
     shut_down_image_deleter(on_finish);