]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds/MDCache.h: init some members of open_ino_info_t in ctor
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Fri, 12 Jun 2015 08:39:14 +0000 (10:39 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Fri, 17 Jul 2015 08:50:44 +0000 (10:50 +0200)
Fix for:

CID 1026809 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
 uninit_member: Non-static class member want_replica is not
  initialized in this constructor nor in any functions that
  it calls.
 uninit_member: Non-static class member want_xlocked is not
  initialized in this constructor nor in any functions that
  it calls.
 uninit_member: Non-static class member tid is not initialized
  in this constructor nor in any functions that it calls.
 uninit_member: Non-static class member pool 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/mds/MDCache.h

index 78e97154e1148cc693072407eee90fcc4183537e..18d2c36edf7840041c877e0f4bd29807573779dc 100644 (file)
@@ -894,7 +894,8 @@ protected:
     int64_t pool;
     list<MDSInternalContextBase*> waiters;
     open_ino_info_t() : checking(MDS_RANK_NONE), auth_hint(MDS_RANK_NONE),
-      check_peers(true), fetch_backtrace(true), discover(false) {}
+      check_peers(true), fetch_backtrace(true), discover(false),
+      want_replica(false), want_xlocked(false), tid(0), pool(-1) {}
   };
   ceph_tid_t open_ino_last_tid;
   map<inodeno_t,open_ino_info_t> opening_inodes;