]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/kstore/KStore.cc: init nid_last in ctor
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Tue, 23 Feb 2016 10:56:27 +0000 (11:56 +0100)
committerSage Weil <sage@redhat.com>
Wed, 9 Nov 2016 19:45:22 +0000 (14:45 -0500)
Fix for:

CID 1351706 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
 uninit_member: Non-static class member nid_last is not initialized
  in this constructor nor in any functions that it calls.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/os/kstore/KStore.cc

index ff034f4be4fe3c17f25bcf06586168dd3bcd4b1e..9f68977c28759a52572a6144005c8efcfa217dc0 100755 (executable)
@@ -631,6 +631,7 @@ KStore::KStore(CephContext *cct, const string& path)
     fsid_fd(-1),
     mounted(false),
     coll_lock("KStore::coll_lock"),
+    nid_last(0),
     nid_max(0),
     throttle_ops(cct, "kstore_max_ops", cct->_conf->kstore_max_ops),
     throttle_bytes(cct, "kstore_max_bytes", cct->_conf->kstore_max_bytes),