From: Danny Al-Gaaf Date: Fri, 13 Mar 2015 23:09:22 +0000 (+0100) Subject: kv_flat_btree_async.h: fix some UNINIT_CTOR issues X-Git-Tag: v9.0.0~95^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=928eaaa2b2508318793af1383410bf54edfece8e;p=ceph.git kv_flat_btree_async.h: fix some UNINIT_CTOR issues 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 --- diff --git a/src/key_value_store/kv_flat_btree_async.h b/src/key_value_store/kv_flat_btree_async.h index 6713bf6ec26b..7003760ce210 100644 --- a/src/key_value_store/kv_flat_btree_async.h +++ b/src/key_value_store/kv_flat_btree_async.h @@ -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),