]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
kv_flat_btree_async.h: fix some UNINIT_CTOR issues
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Fri, 13 Mar 2015 23:09:22 +0000 (00:09 +0100)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Tue, 17 Mar 2015 08:19:40 +0000 (09:19 +0100)
Fix for:

CID 728000: Uninitialized scalar field (UNINIT_CTOR)
 uninit_member: Non-static class member wait_ms is not initialized
 in this constructor nor in any functions that it calls.

CID 727995: Uninitialized scalar field (UNINIT_CTOR)
CID 727996: Uninitialized scalar field (UNINIT_CTOR)
CID 727998: Uninitialized scalar field (UNINIT_CTOR)
CID 727999: Uninitialized scalar field (UNINIT_CTOR)
 uninit_member: Non-static class member unwritable is not initialized
  in this constructor nor in any functions that it calls.
 uninit_member: Non-static class member version is not initialized
  in this constructor nor in any functions that it calls.
 uninit_member: Non-static class member size is not initialized
  in this constructor nor in any functions that it calls.

CID 727997: Uninitialized scalar field (UNINIT_CTOR)
 uninit_member: Non-static class member unwritable is not initialized
  in this constructor nor in any functions that it calls.
 uninit_member: Non-static class member size is not initialized
  in this constructor nor in any functions that it calls.

CID 727994: Uninitialized scalar field (UNINIT_CTOR)
 uninit_member: Non-static class member version 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/key_value_store/kv_flat_btree_async.h

index 6713bf6ec26b9ccca925504f1ddbd1545edd04fb..7003760ce21001666e91c90a5f4247153b883c23 100644 (file)
@@ -132,17 +132,26 @@ struct object_data {
   uint64_t version; //the version at time of read
   uint64_t size; //the number of elements in the omap
 
-  object_data()
+  object_data() 
+  : unwritable(false),
+    version(0),
+    size(0) 
   {}
 
   object_data(string the_name)
-  : name(the_name)
+  : name(the_name),
+    unwritable(false),
+    version(0),
+    size(0) 
   {}
 
   object_data(key_data min, key_data kdat, string the_name)
   : min_kdata(min),
     max_kdata(kdat),
-    name(the_name)
+    name(the_name),
+    unwritable(false),
+    version(0),
+    size(0) 
   {}
 
   object_data(key_data min, key_data kdat, string the_name,
@@ -150,14 +159,19 @@ struct object_data {
   : min_kdata(min),
     max_kdata(kdat),
     name(the_name),
-    omap(the_omap)
+    omap(the_omap),
+    unwritable(false),
+    version(0),
+    size(0) 
   {}
 
   object_data(key_data min, key_data kdat, string the_name, int the_version)
   : min_kdata(min),
     max_kdata(kdat),
     name(the_name),
-    version(the_version)
+    unwritable(false),
+    version(the_version),
+    size(0) 
   {}
 
   void encode(bufferlist &bl) const {
@@ -244,6 +258,7 @@ struct delete_data {
   uint64_t version;
 
   delete_data()
+  : version(0)
   {}
 
   delete_data(key_data n, key_data x, string o, uint64_t v)
@@ -752,6 +767,7 @@ KvFlatBtreeAsync(int k_val, string name, int cache, double cache_r,
     client_name(string(name).append(".")),
     pool_name("rbd"),
     interrupt(&KeyValueStructure::nothing),
+    wait_ms(0),
     timeout(100000,0),
     cache_size(cache),
     cache_refresh(cache_r),