From: amitkuma Date: Wed, 9 Aug 2017 10:11:59 +0000 (+0530) Subject: messages: Initializing members in MOSDPGUpdateLogMissing X-Git-Tag: v13.0.0~155^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a07edfff6bd5e5b8249e38097dd78cd97d34d685;p=ceph.git messages: Initializing members in MOSDPGUpdateLogMissing Fixes the coverity issues: ** 1355242 Uninitialized scalar field 2. uninit_member: Non-static class member map_epoch is not initialized in this constructor nor in any functions that it calls. 4. uninit_member: Non-static class member min_epoch is not initialized in this constructor nor in any functions that it calls. CID 1355242 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR) 6. uninit_member: Non-static class member rep_tid is not initialized in this constructor nor in any functions that it calls. ** 1355243 Uninitialized scalar field 2. uninit_member: Non-static class member map_epoch is not initialized in this constructor nor in any functions that it calls. 4. uninit_member: Non-static class member min_epoch is not initialized in this constructor nor in any functions that it calls. CID 1355243 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR) 6. uninit_member: Non-static class member rep_tid is not initialized in this constructor nor in any functions that it calls. Signed-off-by: Amit Kumar amitkuma@redhat.com --- diff --git a/src/messages/MOSDPGUpdateLogMissing.h b/src/messages/MOSDPGUpdateLogMissing.h index 7823fd08f734..3ca37f631240 100644 --- a/src/messages/MOSDPGUpdateLogMissing.h +++ b/src/messages/MOSDPGUpdateLogMissing.h @@ -25,10 +25,10 @@ class MOSDPGUpdateLogMissing : public MOSDFastDispatchOp { public: - epoch_t map_epoch, min_epoch; + epoch_t map_epoch = 0, min_epoch = 0; spg_t pgid; shard_id_t from; - ceph_tid_t rep_tid; + ceph_tid_t rep_tid = 0; mempool::osd_pglog::list entries; epoch_t get_epoch() const { return map_epoch; } diff --git a/src/messages/MOSDPGUpdateLogMissingReply.h b/src/messages/MOSDPGUpdateLogMissingReply.h index 8df6d9be5c84..e50b8173b062 100644 --- a/src/messages/MOSDPGUpdateLogMissingReply.h +++ b/src/messages/MOSDPGUpdateLogMissingReply.h @@ -25,10 +25,10 @@ class MOSDPGUpdateLogMissingReply : public MOSDFastDispatchOp { public: - epoch_t map_epoch, min_epoch; + epoch_t map_epoch = 0, min_epoch = 0; spg_t pgid; shard_id_t from; - ceph_tid_t rep_tid; + ceph_tid_t rep_tid = 0; epoch_t get_epoch() const { return map_epoch; } spg_t get_pgid() const { return pgid; }