]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common: initialize _hash in LogEntryKey() 15615/head
authorJos Collin <jcollin@redhat.com>
Mon, 12 Jun 2017 03:05:12 +0000 (08:35 +0530)
committerJos Collin <jcollin@redhat.com>
Mon, 12 Jun 2017 03:28:47 +0000 (08:58 +0530)
Fixed:

** CID 717210:  Uninitialized members  (UNINIT_CTOR)
ceph/src/common/LogEntry.h: 70 in LogEntryKey::LogEntryKey()()
Non-static class member "_hash" is not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Jos Collin <jcollin@redhat.com>
src/common/LogEntry.h

index 7d6446a66ea45f4c5c634c8a71dd3586e8e6e673..4feea3d419fc7c15d8752cf77d71df1f020154d5 100644 (file)
@@ -55,7 +55,7 @@ string clog_type_to_string(clog_type t);
 
 struct LogEntryKey {
 private:
-  uint64_t _hash;
+  uint64_t _hash = 0;
 
   void _calc_hash() {
     hash<entity_inst_t> h;