]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cls_refcount: fix uninit vals in ctor
authorSage Weil <sage@inktank.com>
Fri, 28 Sep 2012 15:06:19 +0000 (08:06 -0700)
committerSage Weil <sage@inktank.com>
Fri, 28 Sep 2012 20:18:06 +0000 (13:18 -0700)
CID 727989: Uninitialized scalar field (UNINIT_CTOR)
At (2): Non-static class member "implicit_ref" is not initialized in this constructor nor in any functions that it calls.

+ a few others

Signed-off-by: Sage Weil <sage@inktank.com>
src/cls/refcount/cls_refcount_ops.h

index 9e32490de55052d84d1b60008ff8f07bdf569495..6126b8db46695becc2325b211e1e8ada4c1c542f 100644 (file)
@@ -1,3 +1,6 @@
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
+// vim: ts=8 sw=2 smarttab
+
 #ifndef CEPH_CLS_REFCOUNT_OPS_H
 #define CEPH_CLS_REFCOUNT_OPS_H
 
@@ -9,7 +12,7 @@ struct cls_refcount_get_op {
   string tag;
   bool implicit_ref;
 
-  cls_refcount_get_op() {}
+  cls_refcount_get_op() : implicit_ref(false) {}
 
   void encode(bufferlist& bl) const {
     ENCODE_START(1, 1, bl);
@@ -32,7 +35,7 @@ struct cls_refcount_put_op {
   bool implicit_ref; // assume wildcard reference for
                           // objects without a set ref
 
-  cls_refcount_put_op() {}
+  cls_refcount_put_op() : implicit_ref(false) {}
 
   void encode(bufferlist& bl) const {
     ENCODE_START(1, 1, bl);
@@ -73,7 +76,7 @@ struct cls_refcount_read_op {
   bool implicit_ref; // assume wildcard reference for
                           // objects without a set ref
 
-  cls_refcount_read_op() {}
+  cls_refcount_read_op() : implicit_ref(false) {}
 
   void encode(bufferlist& bl) const {
     ENCODE_START(1, 1, bl);