]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test: Fix implicit-this lambda capture warning
authorAdam C. Emerson <aemerson@redhat.com>
Tue, 8 Mar 2022 03:09:46 +0000 (22:09 -0500)
committerKefu Chai <tchaikov@gmail.com>
Sat, 30 Jul 2022 05:02:16 +0000 (13:02 +0800)
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
src/test/librados_test_stub/TestWatchNotify.cc

index 3b18026bbf0fcfa17daa422a97c503d4cd31068c..48aaf64ef14fb1572fc2c73029dac6a7539ce55a 100644 (file)
@@ -107,7 +107,7 @@ void TestWatchNotify::aio_watch(TestRadosClient *rados_client, int64_t pool_id,
                                 librados::WatchCtx *watch_ctx,
                                 librados::WatchCtx2 *watch_ctx2,
                                 Context *on_finish) {
-  auto ctx = new LambdaContext([=](int) {
+  auto ctx = new LambdaContext([=, this](int) {
       execute_watch(rados_client, pool_id, nspace, o, gid, handle, watch_ctx,
                     watch_ctx2, on_finish);
     });
@@ -134,7 +134,7 @@ void TestWatchNotify::aio_notify(TestRadosClient *rados_client, int64_t pool_id,
                                  const std::string& oid, const bufferlist& bl,
                                  uint64_t timeout_ms, bufferlist *pbl,
                                  Context *on_notify) {
-  auto ctx = new LambdaContext([=](int) {
+  auto ctx = new LambdaContext([=, this](int) {
       execute_notify(rados_client, pool_id, nspace, oid, bl, pbl, on_notify);
     });
   rados_client->get_aio_finisher()->queue(ctx);