]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
cephfs: Fix variable declartion in capture list in lambda 37776/head
authorWillem Jan Withagen <wjw@digiware.nl>
Fri, 23 Oct 2020 23:41:17 +0000 (01:41 +0200)
committerWillem Jan Withagen <wjw@digiware.nl>
Fri, 23 Oct 2020 23:53:14 +0000 (01:53 +0200)
commit77f2f88dcbbc44280a2c4cc1e7c4c8055966fad3
treeaf622e06562f6711b28e845733d113b883283673
parent27871caa7f053fdc338077e0bbc1e51521761205
cephfs: Fix variable declartion in capture list in lambda

/home/jenkins/workspace/ceph-master-compile/src/tools/cephfs_mirror/Mirror.cc:529:33: error: 'mirror_action' in capture list does not name a variable
    m_cond.wait(locker, [this, &mirror_action] {return !mirror_action.action_in_progress;});
                                ^
/home/jenkins/workspace/ceph-master-compile/src/tools/cephfs_mirror/Mirror.cc:529:57: error: reference to local binding 'mirror_action' declared in enclosing function 'cephfs::mirror::Mirror::run'
    m_cond.wait(locker, [this, &mirror_action] {return !mirror_action.action_in_progress;});
                                                        ^
/home/jenkins/workspace/ceph-master-compile/src/tools/cephfs_mirror/Mirror.cc:526:27: note: 'mirror_action' declared here
  for (auto &[filesystem, mirror_action] : m_mirror_actions) {
                          ^
/home/jenkins/workspace/ceph-master-compile/src/tools/cephfs_mirror/Mirror.cc:529:26: warning: lambda capture 'this' is not used [-Wunused-lambda-capture]
    m_cond.wait(locker, [this, &mirror_action] {return !mirror_action.action_in_progress;});
                         ^~~~
1 warning and 2 errors generated.

Tracker: https://tracker.ceph.com/issues/47973
Fixes: https://github.com/ceph/ceph/pull/37313
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
src/tools/cephfs_mirror/Mirror.cc