]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
messages: Intilizating uninitized members MMonGetVersionReply 16813/head
authoramitkuma <amitkuma@redhat.com>
Fri, 4 Aug 2017 14:18:59 +0000 (19:48 +0530)
committeramitkuma <amitkuma@redhat.com>
Fri, 4 Aug 2017 14:18:59 +0000 (19:48 +0530)
Fixes coverity Issue:

** 717297 Uninitialized scalar field
2. uninit_member: Non-static class member handle is not initialized in this constructor nor in any functions that it calls.
   4. uninit_member: Non-static class member version is not initialized in this constructor nor in any functions that it calls.

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

Signed-off-by: Amit Kumar amitkuma@redhat.com
src/messages/MMonGetVersionReply.h

index 55dcd2049155495adae617088ef48116e48b779d..4df114d3c0edd12b204665df6ef25ff9e3f6c047 100644 (file)
@@ -53,9 +53,9 @@ public:
       ::decode(oldest_version, p);
   }
 
-  ceph_tid_t handle;
-  version_t version;
-  version_t oldest_version;
+  ceph_tid_t handle = 0;
+  version_t version = 0;
+  version_t oldest_version = 0;
 
 private:
   ~MMonGetVersionReply() override {}