]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
common/bit_vector.hpp: init scalar field in ctor
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Tue, 23 Feb 2016 18:21:41 +0000 (19:21 +0100)
committerSage Weil <sage@redhat.com>
Wed, 9 Nov 2016 19:45:22 +0000 (14:45 -0500)
Fix for:

CID 1274314 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
 uninit_member: Non-static class member m_header_crc is not initialized
  in this constructor nor in any functions that it calls.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/common/bit_vector.hpp

index 06600e9d8f13d1f59ae1d4ccfb86e63c1ccd57fc..62d924d984f2d17455e39d0ef478d00fb2fafc3e 100644 (file)
@@ -115,7 +115,7 @@ template <uint8_t _b>
 const uint32_t BitVector<_b>::BLOCK_SIZE = 4096;
 
 template <uint8_t _b>
-BitVector<_b>::BitVector() : m_size(0), m_crc_enabled(true)
+BitVector<_b>::BitVector() : m_size(0), m_crc_enabled(true), m_header_crc(0)
 {
 }