From: Danny Al-Gaaf Date: Tue, 23 Feb 2016 06:13:19 +0000 (+0100) Subject: rgw/rgw_rados.h: init non-static class members in ctor X-Git-Tag: v11.1.0~327^2~17 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=df7b7130259c17863beb71d9bf76a46829ce02be;p=ceph.git rgw/rgw_rados.h: init non-static class members in ctor Fix for: CID 1353420 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR) uninit_member: Non-static class member cct is not initialized in this constructor nor in any functions that it calls. uninit_member: Non-static class member store is not initialized in this constructor nor in any functions that it calls. CID 1353421 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR) uninit_member: Non-static class member cct is not initialized in this constructor nor in any functions that it calls. uninit_member: Non-static class member store is not initialized in this constructor nor in any functions that it calls. CID 1353427 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR) uninit_member: Non-static class member cct is not initialized in this constructor nor in any functions that it calls. uninit_member: Non-static class member store is not initialized in this constructor nor in any functions that it calls. Signed-off-by: Danny Al-Gaaf --- diff --git a/src/rgw/rgw_rados.h b/src/rgw/rgw_rados.h index 9f5f7bb95342..8ca54b89d88d 100644 --- a/src/rgw/rgw_rados.h +++ b/src/rgw/rgw_rados.h @@ -871,9 +871,9 @@ protected: int use_default(bool old_format = false); public: - RGWSystemMetaObj() {} - RGWSystemMetaObj(const string& _name): name(_name) {} - RGWSystemMetaObj(const string& _id, const string& _name) : id(_id), name(_name) {} + RGWSystemMetaObj() : cct(NULL), store(NULL) {} + RGWSystemMetaObj(const string& _name): name(_name), cct(NULL), store(NULL) {} + RGWSystemMetaObj(const string& _id, const string& _name) : id(_id), name(_name), cct(NULL), store(NULL) {} RGWSystemMetaObj(CephContext *_cct, RGWRados *_store): cct(_cct), store(_store){} RGWSystemMetaObj(const string& _name, CephContext *_cct, RGWRados *_store): name(_name), cct(_cct), store(_store){} const string& get_name() const { return name; }