]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/rgw_rados.h: init non-static class members in ctor
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Tue, 23 Feb 2016 06:13:19 +0000 (07:13 +0100)
committerSage Weil <sage@redhat.com>
Wed, 9 Nov 2016 19:44:57 +0000 (14:44 -0500)
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 <danny.al-gaaf@bisect.de>
src/rgw/rgw_rados.h

index 9f5f7bb953422b6ac990b8a72e4419822dd960cd..8ca54b89d88d2d7d13d5379c422807f548805404 100644 (file)
@@ -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; }