]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds/CDir.cc: init some integer vars of C_IO_Dir_OMAP_Fetched in ctor
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Fri, 12 Jun 2015 09:37:54 +0000 (11:37 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Fri, 17 Jul 2015 08:50:44 +0000 (10:50 +0200)
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>
src/mds/CDir.cc

index 09060a8bbef4b551275c1349617c9407e851fd5f..57ae11757b3b785d30f6afc4dc48825dca140995 100644 (file)
@@ -1509,7 +1509,9 @@ class C_IO_Dir_OMAP_Fetched : public CDirIOContext {
   bufferlist btbl;
   int ret1, ret2, ret3;
 
-  C_IO_Dir_OMAP_Fetched(CDir *d, const string& w) : CDirIOContext(d), want_dn(w) { }
+  C_IO_Dir_OMAP_Fetched(CDir *d, const string& w) : 
+    CDirIOContext(d), want_dn(w),
+    ret1(0), ret2(0), ret3(0) {}
   void finish(int r) {
     // check the correctness of backtrace
     if (r >= 0 && ret3 != -ECANCELED)