From 1bed1927c7be83d4f785dad73a9dad2aa019ba84 Mon Sep 17 00:00:00 2001 From: amitkuma Date: Tue, 5 Dec 2017 21:08:53 +0530 Subject: [PATCH] test: Initializing ChunkReadOp members 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 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test/osd/RadosModel.h b/src/test/osd/RadosModel.h index a0cd4e3d321dd..9edc141ca3d7b 100644 --- a/src/test/osd/RadosModel.h +++ b/src/test/osd/RadosModel.h @@ -1992,11 +1992,11 @@ public: vector checksums; vector 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, -- 2.39.5