From: Josh Durgin Date: Mon, 24 Sep 2012 20:42:57 +0000 (-0700) Subject: librbd: init cookie in WatchCtx ctor X-Git-Tag: v0.53~60^2~11 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=cd3d3aa6923444ad56416dfa684b9f40d500c668;p=ceph.git librbd: init cookie in WatchCtx ctor 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 --- diff --git a/src/librbd/WatchCtx.h b/src/librbd/WatchCtx.h index 1d4602ad508f..0c0802a40356 100644 --- a/src/librbd/WatchCtx.h +++ b/src/librbd/WatchCtx.h @@ -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);