]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
monclient: uninit var in ctor
authorSage Weil <sage@inktank.com>
Sat, 25 Aug 2012 23:01:10 +0000 (16:01 -0700)
committerSage Weil <sage@inktank.com>
Fri, 31 Aug 2012 20:11:35 +0000 (13:11 -0700)
CID 717328: Uninitialized scalar field (UNINIT_CTOR) [select defect]
At (2): Non-static class member "newest" is not initialized in this constructor nor in any functions that it calls.

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

index ed8e07bda7e39b711940988f3fe4cb6e386f72a1..54f8dabf7589962d660aa0a48fa6dbc4d04b1d05 100644 (file)
@@ -694,7 +694,7 @@ struct C_IsLatestMap : public Context {
   Context *onfinish;
   version_t newest;
   version_t have;
-  C_IsLatestMap(Context *f, version_t h) : onfinish(f), have(h) {}
+  C_IsLatestMap(Context *f, version_t h) : onfinish(f), newest(0), have(h) {}
   void finish(int r) {
     onfinish->complete(r == 0 ? (have != newest) : r);
   }