messages: Initialization of uninitialized members varied classes

Fixes the coverity issues:

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

** 1188169 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.
CID 1188169 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
4. uninit_member: Non-static class member min_epoch is not initialized
in this constructor nor in any functions that it calls.

** 1188170 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.
CID 1188170 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
4. uninit_member: Non-static class member min_epoch is not initialized
in this constructor nor in any functions that it calls.

** 1188171 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.
CID 1188171 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
4. uninit_member: Non-static class member min_epoch is not initialized
in this constructor nor in any functions that it calls.

** 1188172 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.
CID 1188172 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
4. uninit_member: Non-static class member min_epoch is not initialized
 in this constructor nor in any functions that it calls.

** 1188173 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.
CID 1188173 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
4. uninit_member: Non-static class member min_epoch is not initialized
 in this constructor nor in any functions that it calls.

Signed-off-by: Amit Kumar amitkuma@redhat.com
This commit is contained in:
amitkuma 2017-08-06 23:11:10 +05:30
parent f1b1e94494
commit f47baa86aa
5 changed files with 5 additions and 5 deletions

View File

@ -20,7 +20,7 @@
class MExportDirPrepAck : public Message {
dirfrag_t dirfrag;
bool success;
bool success = false;
public:
dirfrag_t get_dirfrag() { return dirfrag; }

View File

@ -24,7 +24,7 @@ class MOSDECSubOpRead : public MOSDFastDispatchOp {
public:
spg_t pgid;
epoch_t map_epoch, min_epoch;
epoch_t map_epoch = 0, min_epoch = 0;
ECSubRead op;
int get_cost() const override {

View File

@ -24,7 +24,7 @@ class MOSDECSubOpReadReply : public MOSDFastDispatchOp {
public:
spg_t pgid;
epoch_t map_epoch, min_epoch;
epoch_t map_epoch = 0, min_epoch = 0;
ECSubReadReply op;
int get_cost() const override {

View File

@ -24,7 +24,7 @@ class MOSDECSubOpWrite : public MOSDFastDispatchOp {
public:
spg_t pgid;
epoch_t map_epoch, min_epoch;
epoch_t map_epoch = 0, min_epoch = 0;
ECSubWrite op;
int get_cost() const override {

View File

@ -24,7 +24,7 @@ class MOSDECSubOpWriteReply : public MOSDFastDispatchOp {
public:
spg_t pgid;
epoch_t map_epoch, min_epoch;
epoch_t map_epoch = 0, min_epoch = 0;
ECSubWriteReply op;
int get_cost() const override {