]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: init value in CopyProgressCtx ctor
authorSage Weil <sage@inktank.com>
Sat, 29 Sep 2012 00:54:34 +0000 (17:54 -0700)
committerSage Weil <sage@inktank.com>
Sat, 29 Sep 2012 00:54:34 +0000 (17:54 -0700)
CID 717227: Uninitialized pointer field (UNINIT_CTOR)
At (4): Non-static class member "src_size" is not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Sage Weil <sage@inktank.com>
src/librbd/internal.cc

index 017102f2d7f37346952fbf2b8ec4304f5c62842a..765e619287f7b697762a13f5f86c9f9e8f2545c4 100644 (file)
@@ -1685,9 +1685,9 @@ reprotect_and_return_err:
 
   struct CopyProgressCtx {
     CopyProgressCtx(ProgressContext &p)
-      : prog_ctx(p)
-    {
-    }
+      : destictx(NULL), src_size(0), prog_ctx(p)
+    { }
+
     ImageCtx *destictx;
     uint64_t src_size;
     ProgressContext &prog_ctx;