]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
ec: initialize lost_chunk in ErasureCodeClay 52714/head
authorCasey Bodley <cbodley@redhat.com>
Mon, 31 Jul 2023 21:01:52 +0000 (17:01 -0400)
committerCasey Bodley <cbodley@redhat.com>
Mon, 31 Jul 2023 21:01:56 +0000 (17:01 -0400)
commiteb4349e78eb139824fb82991be93650aa60801f9
tree01f8fb535349c9a81a926860a5f228faa6960a50
parentf4a421f8ab1c7360f783a0b9bec90c3a89819a6f
ec: initialize lost_chunk in ErasureCodeClay

[346/687] Building CXX object src/erasure-code/clay/CMakeFiles/ec_clay.dir/ErasureCodeClay.cc.o
In file included from /home/cbodley/ceph/src/common/dout.h:21,
                 from /home/cbodley/ceph/src/common/debug.h:18,
                 from /home/cbodley/ceph/src/erasure-code/clay/ErasureCodeClay.cc:22:
home/cbodley/ceph/src/erasure-code/clay/ErasureCodeClay.cc: In member function ‘int ErasureCodeClay::repair_one_lost_chunk(std::map<int, ceph::buffer::v15_2_0::list>&, std::set<int>&, std::map<int, ceph::buffer::v15_2_0::list>&, int, std::vector<std::pair<int, int> >&)’:
/home/cbodley/ceph/src/erasure-code/clay/ErasureCodeClay.cc:620:41: warning: ‘lost_chunk’ may be used uninitialized [-Wmaybe-uninitialized]
  620 |             ceph_assert(y == lost_chunk / q);
      |                              ~~~~~~~~~~~^~~
/home/cbodley/ceph/src/include/ceph_assert.h:106:6: note: in definition of macro ‘ceph_assert’
  106 |    ((expr) \
      |      ^~~~
/home/cbodley/ceph/src/erasure-code/clay/ErasureCodeClay.cc:510:7: note: ‘lost_chunk’ was declared here
  510 |   int lost_chunk;
      |       ^~~~~~~~~~

Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/erasure-code/clay/ErasureCodeClay.cc