]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test: Initializing ChunkReadOp members 19334/head
authoramitkuma <amitkuma@redhat.com>
Tue, 5 Dec 2017 15:38:53 +0000 (21:08 +0530)
committeramitkuma <amitkuma@redhat.com>
Tue, 5 Dec 2017 15:38:53 +0000 (21:08 +0530)
Fixes the coverity issue:
2. uninit_member: Non-static class member offset is not
initialized in this constructor nor in any functions that it calls.
4. uninit_member: Non-static class member length is not
initialized in this constructor nor in any functions that it calls.

CID 1424433 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
6. uninit_member: Non-static class member tgt_offset is not initialized
in this constructor nor in any functions that it calls.

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

index a0cd4e3d321ddfe965c23fcdd133de1225e1c8e3..9edc141ca3d7ba2610eb4d165cb8a4e240881c41 100644 (file)
@@ -1992,11 +1992,11 @@ public:
 
   vector<bufferlist> checksums;
   vector<int> checksum_retvals;
-  uint32_t offset;
-  uint32_t length;
+  uint32_t offset = 0;
+  uint32_t length = 0;
   string tgt_oid;
   string tgt_pool_name;
-  uint32_t tgt_offset;
+  uint32_t tgt_offset = 0;
 
   ChunkReadOp(int n,
         RadosTestContext *context,