]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/librbd: remove some unused captures
authorRonen Friedman <rfriedma@redhat.com>
Tue, 19 May 2020 13:11:28 +0000 (16:11 +0300)
committerRonen Friedman <rfriedma@redhat.com>
Tue, 19 May 2020 13:17:16 +0000 (16:17 +0300)
...silencing Clang warnings

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
src/test/librbd/cache/test_mock_ParentImageCache.cc
src/test/librbd/mirror/test_mock_DisableRequest.cc

index d48b5ec1993e53922b9e035e71f3fbcd0e3b4601..d2455fc1951c0a6b2408da82cf4d266a599b0b36 100644 (file)
@@ -62,7 +62,7 @@ class TestMockParentImageCache : public TestMockFixture {
   void expect_cache_run(MockParentImageCache& mparent_image_cache, bool ret_val) {
     auto& expect = EXPECT_CALL(*(mparent_image_cache.get_cache_client()), run());
 
-    expect.WillOnce((Invoke([ret_val]() {
+    expect.WillOnce((Invoke([]() {
     })));
   }
 
@@ -105,14 +105,14 @@ class TestMockParentImageCache : public TestMockFixture {
   void expect_cache_close(MockParentImageCache& mparent_image_cache, int ret_val) {
     auto& expect = EXPECT_CALL(*(mparent_image_cache.get_cache_client()), close());
 
-    expect.WillOnce((Invoke([ret_val]() {
+    expect.WillOnce((Invoke([]() {
     })));
   }
 
   void expect_cache_stop(MockParentImageCache& mparent_image_cache, int ret_val) {
     auto& expect = EXPECT_CALL(*(mparent_image_cache.get_cache_client()), stop());
 
-    expect.WillOnce((Invoke([ret_val]() {
+    expect.WillOnce((Invoke([]() {
     })));
   }
 
@@ -135,7 +135,7 @@ class TestMockParentImageCache : public TestMockFixture {
     auto& expect = EXPECT_CALL((*(mparent_image_cache.get_image_ctx()->io_object_dispatcher)),
                                register_object_dispatch(_));
 
-        expect.WillOnce(WithArg<0>(Invoke([ret_val, &mparent_image_cache]
+        expect.WillOnce(WithArg<0>(Invoke([&mparent_image_cache]
                 (io::ObjectDispatchInterface* object_dispatch) {
           ASSERT_EQ(object_dispatch, &mparent_image_cache);
         })));
index ea9936a66bcdf048e3922ac311356449cfa330bd..95c8927772aed0344ee0dbb6585029104287abb9 100644 (file)
@@ -188,7 +188,7 @@ public:
 
     EXPECT_CALL(mock_get_info_request, send())
       .WillOnce(
-        Invoke([this, &mock_image_ctx, &mock_get_info_request, mirror_image,
+        Invoke([&mock_image_ctx, &mock_get_info_request, mirror_image,
                 promotion_state, r]() {
                  if (r == 0) {
                    *mock_get_info_request.mirror_image = mirror_image;
@@ -204,7 +204,7 @@ public:
       MockImageStateUpdateRequest& mock_request, int r) {
     EXPECT_CALL(mock_request, send())
       .WillOnce(
-        Invoke([this, &mock_image_ctx, &mock_request, r]() {
+        Invoke([&mock_image_ctx, &mock_request, r]() {
           mock_image_ctx.op_work_queue->queue(mock_request.on_finish, r);
         }));
   }
@@ -214,7 +214,7 @@ public:
       MockImageRemoveRequest& mock_request, int r) {
     EXPECT_CALL(mock_request, send())
       .WillOnce(
-        Invoke([this, &mock_image_ctx, &mock_request, r]() {
+        Invoke([&mock_image_ctx, &mock_request, r]() {
           mock_image_ctx.op_work_queue->queue(mock_request.on_finish, r);
         }));
   }