]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
cls/rbd: init local var with known value 25588/head
authorKefu Chai <kchai@redhat.com>
Thu, 20 Dec 2018 03:24:28 +0000 (11:24 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 3 Jan 2019 02:19:02 +0000 (10:19 +0800)
commit75c2d63c3159e8987b0e1979362915f63c445aaa
tree6e50610407386b15e2ea8b87ea7030bb426e8f62
parent0e1cdcd94906d0dacf3f8b579a51c91e4e98a9c6
cls/rbd: init local var with known value

DirectoryState does not have an "invalid" enum so far, since it's
defined using `enum class`, init a value of this type with a known value
could be a better choice even it is always initialized before being read.

this silences the GCC warning of:

src/cls/rbd/cls_rbd.cc:3147:3: warning: ‘on_disk_directory_state’ may be
used uninitialized in this function [-Wmaybe-uninitialized]
   if (directory_state != on_disk_directory_state) {
   ^~

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/cls/rbd/cls_rbd.cc