]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/librados: Initializing left members from aio.cc 16845/head
authoramitkuma <amitkuma@redhat.com>
Sun, 6 Aug 2017 16:43:36 +0000 (22:13 +0530)
committeramitkuma <amitkuma@redhat.com>
Mon, 7 Aug 2017 16:51:14 +0000 (22:21 +0530)
Fixes the coverity Issue:

** 1322815 Uninitialized pointer field
CID 1322815 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR)
2. uninit_member: Non-static class member m_sem is not initialized
in this constructor nor in any functions that it calls.

** 1322816 Uninitialized pointer field
CID 1322816 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR)
2. uninit_member: Non-static class member m_sem is not initialized
in this constructor nor in any functions that it calls.

** 1322817 Uninitialized pointer field
CID 1322817 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR)
2. uninit_member: Non-static class member m_sem is not initialized
in this constructor nor in any functions that it calls.

Signed-off-by: Amit Kumar amitkuma@redhat.com
src/test/librados/aio.cc

index ff5064ba353e1244b8112c07cef680ebcbe3af43..d795b84683fc50d2a50b37e3a3f7bd50b2e3f26f 100644 (file)
@@ -68,7 +68,7 @@ public:
     return "";
   }
 
-  sem_t *m_sem;
+  sem_t *m_sem = nullptr;
   rados_t m_cluster;
   rados_ioctx_t m_ioctx;
   std::string m_pool_name;
@@ -131,7 +131,7 @@ public:
     return "";
   }
 
-  sem_t *m_sem;
+  sem_t *m_sem = nullptr;
   Rados m_cluster;
   IoCtx m_ioctx;
   std::string m_pool_name;
@@ -2570,7 +2570,7 @@ public:
     return "";
   }
 
-  sem_t *m_sem;
+  sem_t *m_sem = nullptr;
   Rados m_cluster;
   IoCtx m_ioctx;
   std::string m_pool_name;