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

CID 717354 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR)
 uninit_member: Non-static class member id is not initialized in
  this constructor nor in any functions that it calls.
 uninit_member: Non-static class member type is not initialized in
  this constructor nor in any functions that it calls.
 uninit_member: Non-static class member off is not initialized in
  this constructor nor in any functions that it calls.
 uninit_member: Non-static class member len is not initialized in
  this constructor nor in any functions that it calls.
 uninit_member: Non-static class member lg is not initialized in
  this constructor nor in any functions that it calls.
 uninit_member: Non-static class member completion 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/tools/rados/rados.cc

index 165f7343cb0d43683dfe6d4f794511bdf2ffbe4e..7e72d8c073917351fab7803b7ed6ee997b68e943 100644 (file)
@@ -527,7 +527,7 @@ public:
     LoadGen *lg;
     librados::AioCompletion *completion;
 
-    LoadGenOp() {}
+    LoadGenOp() : id(0), type(0), off(0), len(0), lg(NULL), completion(NULL) {}
     LoadGenOp(LoadGen *_lg) : id(0), type(0), off(0), len(0), lg(_lg), completion(NULL) {}
   };