From: Sage Weil Date: Fri, 28 Sep 2012 14:29:16 +0000 (-0700) Subject: messages: uninit values X-Git-Tag: v0.54~187^2~16 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=02e48394cc4945cc5ed4226f6898fa3eb8fd852f;p=ceph.git messages: uninit values CID 717259: Uninitialized scalar field (UNINIT_CTOR) At (2): Non-static class member "global_id" is not initialized in this constructor nor in any functions that it calls. CID 728086: Uninitialized scalar field (UNINIT_CTOR) At (4): Non-static class member "type" is not initialized in this constructor nor in any functions that it calls. CID 717260: Uninitialized scalar field (UNINIT_CTOR) At (2): Non-static class member "from" is not initialized in this constructor nor in any functions that it calls. CID 717261: Uninitialized scalar field (UNINIT_CTOR) At (51): Non-static class member field "head.time_warp_seq" is not initialized in this constructor nor in any functions that it calls. + more Signed-off-by: Sage Weil --- diff --git a/src/messages/MAuthReply.h b/src/messages/MAuthReply.h index 8704346dc760..76359a5a756b 100644 --- a/src/messages/MAuthReply.h +++ b/src/messages/MAuthReply.h @@ -24,7 +24,7 @@ struct MAuthReply : public Message { string result_msg; bufferlist result_bl; - MAuthReply() : Message(CEPH_MSG_AUTH_REPLY), protocol(0), result(0) {} + MAuthReply() : Message(CEPH_MSG_AUTH_REPLY), protocol(0), result(0), global_id(0) {} MAuthReply(__u32 p, bufferlist *bl = NULL, int r = 0, uint64_t gid=0, const char *msg = "") : Message(CEPH_MSG_AUTH_REPLY), protocol(p), result(r), global_id(gid), diff --git a/src/messages/MBackfillReserve.h b/src/messages/MBackfillReserve.h index 47eb1d378138..68e78cb7c800 100644 --- a/src/messages/MBackfillReserve.h +++ b/src/messages/MBackfillReserve.h @@ -29,16 +29,17 @@ public: REJECT = 2, }; int type; + + MBackfillReserve() + : Message(MSG_OSD_BACKFILL_RESERVE, HEAD_VERSION, COMPAT_VERSION), + query_epoch(0), type(-1) {} MBackfillReserve(int type, - pg_t pgid, - epoch_t query_epoch) + pg_t pgid, + epoch_t query_epoch) : Message(MSG_OSD_BACKFILL_RESERVE, HEAD_VERSION, COMPAT_VERSION), pgid(pgid), query_epoch(query_epoch), type(type) {} - MBackfillReserve() : - Message(MSG_OSD_BACKFILL_RESERVE, HEAD_VERSION, COMPAT_VERSION) {} - const char *get_type_name() const { return "MBackfillReserve"; } diff --git a/src/messages/MCacheExpire.h b/src/messages/MCacheExpire.h index 717998d0b97d..aa40407d063c 100644 --- a/src/messages/MCacheExpire.h +++ b/src/messages/MCacheExpire.h @@ -47,7 +47,7 @@ public: int get_from() { return from; } - MCacheExpire() : Message(MSG_MDS_CACHEEXPIRE) {} + MCacheExpire() : Message(MSG_MDS_CACHEEXPIRE), from(-1) {} MCacheExpire(int f) : Message(MSG_MDS_CACHEEXPIRE), from(f) { } diff --git a/src/messages/MClientReply.h b/src/messages/MClientReply.h index a2803ef9ded5..88f7576e01ed 100644 --- a/src/messages/MClientReply.h +++ b/src/messages/MClientReply.h @@ -51,6 +51,9 @@ struct LeaseStat { __u16 mask; __u32 duration_ms; __u32 seq; + + LeaseStat() : mask(0), duration_ms(0), seq(0) {} + void encode(bufferlist &bl) const { ::encode(mask, bl); ::encode(duration_ms, bl); diff --git a/src/messages/MClientRequestForward.h b/src/messages/MClientRequestForward.h index c212a4a30e99..e174d83e8e96 100644 --- a/src/messages/MClientRequestForward.h +++ b/src/messages/MClientRequestForward.h @@ -22,7 +22,9 @@ class MClientRequestForward : public Message { bool client_must_resend; public: - MClientRequestForward() : Message(CEPH_MSG_CLIENT_REQUEST_FORWARD) {} + MClientRequestForward() + : Message(CEPH_MSG_CLIENT_REQUEST_FORWARD), + dest_mds(-1), num_fwd(-1), client_must_resend(false) {} MClientRequestForward(tid_t t, int dm, int nf, bool cmr) : Message(CEPH_MSG_CLIENT_REQUEST_FORWARD), dest_mds(dm), num_fwd(nf), client_must_resend(cmr) {