]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PG.h: uninit var in ctor OndiskLog
authorSamuel Just <sam.just@inktank.com>
Wed, 29 Aug 2012 23:31:20 +0000 (16:31 -0700)
committerSage Weil <sage@inktank.com>
Fri, 31 Aug 2012 20:11:36 +0000 (13:11 -0700)
CID 717342: Uninitialized scalar field (UNINIT_CTOR)At (2): Non-static class
member "has_checksums" is not initialized in this constructor nor in any
functions that it calls.

Signed-off-by: Samuel Just <sam.just@inktank.com>
src/osd/PG.h

index 614cdfa9feed99da2f771ca2d3f2205a0c7924b9..92c37d25e9a0d3ff9b244e2e6e29c9f5ac853dfe 100644 (file)
@@ -281,7 +281,8 @@ public:
     uint64_t zero_to;                // first non-zeroed byte of log.
     bool has_checksums;
 
-    OndiskLog() : tail(0), head(0), zero_to(0) {}
+    OndiskLog() : tail(0), head(0), zero_to(0),
+                 has_checksums(true) {}
 
     uint64_t length() { return head - tail; }
     bool trim_to(eversion_t v, ObjectStore::Transaction& t);