]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd_replay/Replayer.cc: init non-static members in ctor
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Wed, 17 Jun 2015 17:32:00 +0000 (19:32 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Fri, 17 Jul 2015 08:50:45 +0000 (10:50 +0200)
Fix for:

CID 1232607 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR)
 uninit_member: Non-static class member m_dump_perf_counters is not
  initialized in this constructor nor in any functions that it calls.
 uninit_member: Non-static class member m_rbd is not initialized in
  this constructor nor in any functions that it calls.
 uninit_member: Non-static class member m_ioctx is not initialized in
  this constructor nor in any functions that it calls.
 uninit_member: Non-static class member m_latency_multiplier is not
  initialized in this constructor nor in any functions that it calls.
 uninit_member: Non-static class member m_readonly 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/rbd_replay/Replayer.cc

index 19403e51a3d67ccfcb3965b508214d5dc22321c9..1d1418c5ae83faded156c6e6c6b334b5059d5a98 100644 (file)
@@ -134,7 +134,9 @@ rbd_loc Worker::map_image_name(string image_name, string snap_name) const {
 
 
 Replayer::Replayer(int num_action_trackers)
-  : m_pool_name("rbd"),
+  : m_rbd(NULL), m_ioctx(0),  
+    m_pool_name("rbd"), m_latency_multiplier(1.0), 
+    m_readonly(false), m_dump_perf_counters(false),
     m_num_action_trackers(num_action_trackers),
     m_action_trackers(new action_tracker_d[m_num_action_trackers]) {
   assertf(num_action_trackers > 0, "num_action_trackers = %d", num_action_trackers);