]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds/events: Initialize Non-static class members in EFragment
authorJos Collin <jcollin@redhat.com>
Wed, 28 Jun 2017 11:21:01 +0000 (16:51 +0530)
committerJos Collin <jcollin@redhat.com>
Wed, 28 Jun 2017 11:26:11 +0000 (16:56 +0530)
Fixes the coverity scan report:
CID 717240: Uninitialized scalar field (UNINIT_CTOR)
2. uninit_member: Non-static class member op is not initialized in this constructor nor in any functions that it calls.
4. uninit_member: Non-static class member bits is not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Jos Collin <jcollin@redhat.com>
src/mds/events/EFragment.h

index ad6f591ca3964283a3d7580bcc6f524efc67a3f9..2ebf0812df57b1e0d9f5def2fa3e6437f09129b8 100644 (file)
@@ -29,10 +29,10 @@ WRITE_CLASS_ENCODER(dirfrag_rollback)
 class EFragment : public LogEvent {
 public:
   EMetaBlob metablob;
-  __u8 op;
+  __u8 op{0};
   inodeno_t ino;
   frag_t basefrag;
-  __s32 bits;         // positive for split (from basefrag), negative for merge (to basefrag)
+  __s32 bits{0};         // positive for split (from basefrag), negative for merge (to basefrag)
   list<frag_t> orig_frags;
   bufferlist rollback;