From df7b7130259c17863beb71d9bf76a46829ce02be Mon Sep 17 00:00:00 2001 From: Danny Al-Gaaf Date: Tue, 23 Feb 2016 07:13:19 +0100 Subject: [PATCH] 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 --- src/rgw/rgw_rados.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rgw/rgw_rados.h b/src/rgw/rgw_rados.h index 9f5f7bb9534..8ca54b89d88 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; } -- 2.47.3