Skip to content

Commit ba8988b

Browse files
committed
mds/CDir.cc: init some integer vars of C_IO_Dir_OMAP_Fetched in ctor
Fix for: CID 1238901 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR) uninit_member: Non-static class member ret1 is not initialized in this constructor nor in any functions that it calls. uninit_member: Non-static class member ret2 is not initialized in this constructor nor in any functions that it calls. uninit_member: Non-static class member ret3 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 f819cf1 commit ba8988b

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/mds/CDir.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1509,7 +1509,9 @@ class C_IO_Dir_OMAP_Fetched : public CDirIOContext {
15091509
bufferlist btbl;
15101510
int ret1, ret2, ret3;
15111511

1512-
C_IO_Dir_OMAP_Fetched(CDir *d, const string& w) : CDirIOContext(d), want_dn(w) { }
1512+
C_IO_Dir_OMAP_Fetched(CDir *d, const string& w) :
1513+
CDirIOContext(d), want_dn(w),
1514+
ret1(0), ret2(0), ret3(0) {}
15131515
void finish(int r) {
15141516
// check the correctness of backtrace
15151517
if (r >= 0 && ret3 != -ECANCELED)

0 commit comments

Comments
 (0)