Skip to content

Commit 08506f3

Browse files
committed
mds/MDCache.h: init some members of open_ino_info_t in ctor
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>
1 parent fc5093a commit 08506f3

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/mds/MDCache.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -894,7 +894,8 @@ class MDCache {
894894
int64_t pool;
895895
list<MDSInternalContextBase*> waiters;
896896
open_ino_info_t() : checking(MDS_RANK_NONE), auth_hint(MDS_RANK_NONE),
897-
check_peers(true), fetch_backtrace(true), discover(false) {}
897+
check_peers(true), fetch_backtrace(true), discover(false),
898+
want_replica(false), want_xlocked(false), tid(0), pool(-1) {}
898899
};
899900
ceph_tid_t open_ino_last_tid;
900901
map<inodeno_t,open_ino_info_t> opening_inodes;

0 commit comments

Comments
 (0)