]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: init cookie in WatchCtx ctor
authorJosh Durgin <josh.durgin@inktank.com>
Mon, 24 Sep 2012 20:42:57 +0000 (13:42 -0700)
committerJosh Durgin <josh.durgin@inktank.com>
Tue, 25 Sep 2012 00:41:49 +0000 (17:41 -0700)
CID 717226: Uninitialized scalar field (UNINIT_CTOR)
At (2): Non-static class member "cookie" is not initialized in this
constructor nor in any functions that it calls.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
src/librbd/WatchCtx.h

index 1d4602ad508faabc1bf341c9cd9ac63067c6750e..0c0802a40356f4902ecd8bdd0540300a685c02aa 100644 (file)
@@ -21,7 +21,8 @@ namespace librbd {
     uint64_t cookie;
     WatchCtx(ImageCtx *ctx) : ictx(ctx),
                              valid(true),
-                             lock("librbd::WatchCtx") {}
+                             lock("librbd::WatchCtx"),
+                             cookie(0) {}
     virtual ~WatchCtx() {}
     void invalidate();
     virtual void notify(uint8_t opcode, uint64_t ver, ceph::bufferlist& bl);