]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: init all fields
authorSage Weil <sage@redhat.com>
Mon, 28 Nov 2016 19:22:32 +0000 (14:22 -0500)
committerSage Weil <sage@redhat.com>
Mon, 28 Nov 2016 19:29:13 +0000 (14:29 -0500)
9. uninit_member: Non-static class member block_size is not initialized in this constructor nor in any functions that it calls.
     11. uninit_member: Non-static class member block_mask is not initialized in this constructor nor in any functions that it calls.
     13. uninit_member: Non-static class member block_size_order is not initialized in this constructor nor in any functions that it calls.

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

Signed-off-by: Sage Weil <sage@redhat.com>
src/os/bluestore/BlueStore.h

index bfac18f44bd3151985e5d6eb2b207a3da9b03e2f..2676afe6f70d5e738a6df3476f67a15f5689ee96 100644 (file)
@@ -1542,15 +1542,15 @@ private:
 
   std::atomic<int> csum_type;
 
-  uint64_t block_size;     ///< block size of block device (power of 2)
-  uint64_t block_mask;     ///< mask to get just the block offset
-  size_t block_size_order; ///< bits to shift to get block size
+  uint64_t block_size = 0;     ///< block size of block device (power of 2)
+  uint64_t block_mask = 0;     ///< mask to get just the block offset
+  size_t block_size_order = 0; ///< bits to shift to get block size
 
   uint64_t min_alloc_size = 0; ///< minimum allocation unit (power of 2)
   uint64_t min_min_alloc_size = 0; ///< minimum seen min_alloc_size
   size_t min_alloc_size_order = 0; ///< bits for min_alloc_size
 
-  uint64_t max_alloc_size; ///< maximum allocation unit (power of 2)
+  uint64_t max_alloc_size = 0; ///< maximum allocation unit (power of 2)
 
   bool sync_wal_apply;   ///< see config option bluestore_sync_wal_apply