]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
librbd: always initialize local variables 31311/head
authorKefu Chai <kchai@redhat.com>
Fri, 1 Nov 2019 05:32:24 +0000 (13:32 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 1 Nov 2019 05:34:23 +0000 (13:34 +0800)
commit95aa2e5ab772bd98fb2fe73d31836f865937aad7
tree7f1d8c0b94c28d5a4869be8da5a59037e8d715b4
parenta3352d7e9ab8dea0669db3d77abcd05906eb9deb
librbd: always initialize local variables

silence warnings like:

src/librbd/io/ImageRequestWQ.cc:576:7: warning: 'length' may be used uninitialized in this function [-Wmaybe-uninitialized]
       if (block_overlapping_io(&m_in_flight_extents, offset, length)) {
       ^~
...
src/librbd/io/ImageRequestWQ.cc:935:12: note: 'length' was declared here
   uint64_t length;
            ^~~~~~

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/librbd/io/ImageRequestWQ.cc