]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
messages: Initializing members in MOSDPGUpdateLogMissing 16928/head
authoramitkuma <amitkuma@redhat.com>
Wed, 9 Aug 2017 10:11:59 +0000 (15:41 +0530)
committeramitkuma <amitkuma@redhat.com>
Wed, 9 Aug 2017 10:11:59 +0000 (15:41 +0530)
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
src/messages/MOSDPGUpdateLogMissing.h
src/messages/MOSDPGUpdateLogMissingReply.h

index 7823fd08f73430e24dfdc6715c3169fdcb9286ff..3ca37f6312409f2601adbf26e1038063eb760d00 100644 (file)
@@ -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<pg_log_entry_t> entries;
 
   epoch_t get_epoch() const { return map_epoch; }
index 8df6d9be5c84d9cf0e015d6beca8454c57acec4a..e50b8173b062a2617da5800b7ca432e2515bb952 100644 (file)
@@ -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; }