]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rados: Initializing uninitialized pointer variables 16785/head
authoramitkuma <amitkuma@redhat.com>
Thu, 3 Aug 2017 17:16:25 +0000 (22:46 +0530)
committeramitkuma <amitkuma@redhat.com>
Sat, 5 Aug 2017 18:26:38 +0000 (23:56 +0530)
Fixes the coverity issue:

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

Signed-off-by: Amit Kumar amitkuma@redhat.com
src/test/librados_test_stub/TestMemIoCtxImpl.h

index c76fb3cf8cb208ac4842c7b744e032ccbff5b5d5..c0f0c6f54556c5b3ec3210af263c0c9b7fd42f9e 100644 (file)
@@ -78,8 +78,8 @@ protected:
 private:
   TestMemIoCtxImpl(const TestMemIoCtxImpl&);
 
-  TestMemRadosClient *m_client;
-  TestMemCluster::Pool *m_pool;
+  TestMemRadosClient *m_client = nullptr;
+  TestMemCluster::Pool *m_pool = nullptr;
 
   void append_clone(bufferlist& src, bufferlist* dest);
   size_t clip_io(size_t off, size_t len, size_t bl_len);