]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
messages/MMDSOpenInoReply.h: init 'error' in ctor
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Fri, 12 Jun 2015 08:49:00 +0000 (10:49 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Fri, 17 Jul 2015 08:50:44 +0000 (10:50 +0200)
Fix for:

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

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/messages/MMDSOpenInoReply.h

index 1bf41b88268f0dc24281a4628dec8ec0b7ef5b4e..76cc55ce9f8b45fb2d78ea6488c0d572d0ac271d 100644 (file)
@@ -23,7 +23,7 @@ struct MMDSOpenInoReply : public Message {
   mds_rank_t hint;
   int32_t error;
 
-  MMDSOpenInoReply() : Message(MSG_MDS_OPENINOREPLY) {}
+  MMDSOpenInoReply() : Message(MSG_MDS_OPENINOREPLY), error(0) {}
   MMDSOpenInoReply(ceph_tid_t t, inodeno_t i, mds_rank_t h=MDS_RANK_NONE, int e=0) :
     Message(MSG_MDS_OPENINOREPLY), ino(i), hint(h), error(e) {
     header.tid = t;