]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix uninit var
authorSage Weil <sage@inktank.com>
Sat, 1 Dec 2012 05:41:54 +0000 (21:41 -0800)
committerSage Weil <sage@inktank.com>
Sun, 2 Dec 2012 00:57:00 +0000 (16:57 -0800)
CID 745935 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
At (2): Non-static class member "expiration" is not initialized in this constructor nor in any functions that it calls.

At (2): Non-static class member "min_len" is not initialized in this constructor nor in any functions that it calls.
At (4): Non-static class member "max_len" is not initialized in this constructor nor in any functions that it calls.
At (6): Non-static class member "ret" is not initialized in this constructor nor in any functions that it calls.
At (8): Non-static class member "len" is not initialized in this constructor nor in any functions that it calls.
At (10): Non-static class member "ofs" is not initialized in this constructor nor in any functions that it calls.
At (12): Non-static class member "supplied_md5_b64" is not initialized in this constructor nor in any functions that it calls.
At (14): Non-static class member "supplied_etag" is not initialized in this constructor nor in any functions that it calls.
CID 745934 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR)
At (16): Non-static class member "data_pending" is not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Sage Weil <sage@inktank.com>
src/rgw/rgw_op.h
src/rgw/rgw_swift.h

index 043bad03f3fbbd79458edfec0e81b10943475dd5..652e9c050dc44c73659159958fb6dc868aa85895 100644 (file)
@@ -337,20 +337,12 @@ protected:
   map<string, bufferlist> attrs;
 
 public:
-  RGWPostObj() {}
+  RGWPostObj() : min_len(0), max_len(LLONG_MAX), ret(0), len(0), ofs(0),
+                supplied_md5_b64(NULL), supplied_etag(NULL),
+                data_pending(false) {}
 
   virtual void init(RGWRados *store, struct req_state *s, RGWHandler *h) {
     RGWOp::init(store, s, h);
-    min_len = 0;
-    max_len = LLONG_MAX;
-    ret = 0;
-    len = 0;
-    ofs = 0;
-    supplied_md5_b64 = NULL;
-    supplied_etag = NULL;
-    etag = "";
-    boundary = "";
-    data_pending = false;
     policy.set_ctx(s->cct);
   }
 
index bdca5b46283e62b2a0e62377cbe5db22db1f5b60..6c5024e1a54c5668a2667be086c2c0e38339612b 100644 (file)
@@ -26,7 +26,7 @@ public:
 
   map<string, bool> roles;
 
-  KeystoneToken() {}
+  KeystoneToken() : expiration(0) {}
 
   int parse(CephContext *cct, bufferlist& bl);