]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
messages: uninit values
authorSage Weil <sage@inktank.com>
Fri, 28 Sep 2012 14:29:16 +0000 (07:29 -0700)
committerSage Weil <sage@inktank.com>
Fri, 28 Sep 2012 20:18:05 +0000 (13:18 -0700)
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 <sage@inktank.com>
src/messages/MAuthReply.h
src/messages/MBackfillReserve.h
src/messages/MCacheExpire.h
src/messages/MClientReply.h
src/messages/MClientRequestForward.h

index 8704346dc760618928a19b843ec9687b4d3231df..76359a5a756b41f52ccc362f746d7f60dfe41464 100644 (file)
@@ -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),
index 47eb1d3781387e8e4b35ddb378662d01753457a4..68e78cb7c80010be61c4568eb6a60f0488ccc5be 100644 (file)
@@ -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";
   }
index 717998d0b97dbd5c0eeb14b513ea980b12db7007..aa40407d063cea950fc9d0bdfbf9e1fbbcefc979 100644 (file)
@@ -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) { }
index a2803ef9ded55d6d30a832ec251eeac13b656292..88f7576e01edbbadf210edd54aee9471e87310de 100644 (file)
@@ -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);
index c212a4a30e99924721da554a113339429623f9d1..e174d83e8e964dffbb9970eddc942ca2c8f0e54b 100644 (file)
@@ -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) {