]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
src/rgw/rgw_rados.h: init some RGWPeriod member vars in ctor
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Tue, 23 Feb 2016 12:25:45 +0000 (13:25 +0100)
committerSage Weil <sage@redhat.com>
Wed, 9 Nov 2016 19:45:22 +0000 (14:45 -0500)
Fix for:

CID 1353422 (#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 1353426 (#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 8ca54b89d88d2d7d13d5379c422807f548805404..6d7525fb0ab835bbc21d9a5319ef9e6000eb9edb 100644 (file)
@@ -1559,10 +1559,11 @@ class RGWPeriod
   int update_sync_status();
 
 public:
-  RGWPeriod() : epoch(0) {}
+  RGWPeriod() : epoch(0), cct(NULL), store(NULL) {}
 
   RGWPeriod(const string& period_id, epoch_t _epoch = 0)
-    : id(period_id), epoch(_epoch) {}
+    : id(period_id), epoch(_epoch),
+      cct(NULL), store(NULL) {}
 
   const string& get_id() const { return id; }
   epoch_t get_epoch() const { return epoch; }