From 1dd62d44ad4df21973bb7baf91bb171f50906db4 Mon Sep 17 00:00:00 2001 From: Jos Collin Date: Wed, 28 Jun 2017 16:51:01 +0530 Subject: [PATCH] mds/events: Initialize Non-static class members in EFragment 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 --- src/mds/events/EFragment.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mds/events/EFragment.h b/src/mds/events/EFragment.h index ad6f591ca39..2ebf0812df5 100644 --- a/src/mds/events/EFragment.h +++ b/src/mds/events/EFragment.h @@ -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 orig_frags; bufferlist rollback; -- 2.47.3