diff --git a/utilities/persistent_cache/block_cache_tier_file.cc b/utilities/persistent_cache/block_cache_tier_file.cc index 85e0610b7..9e419563a 100644 --- a/utilities/persistent_cache/block_cache_tier_file.cc +++ b/utilities/persistent_cache/block_cache_tier_file.cc @@ -62,7 +62,8 @@ Status BlockCacheFile::Delete(uint64_t* size) { // <-- 4 --><-- 4 --><-- 4 --><-- 4 --><-- key size --><-- v-size --> // struct CacheRecordHeader { - CacheRecordHeader() {} + CacheRecordHeader() + : magic_(0), crc_(0), key_size_(0), val_size_(0) {} CacheRecordHeader(const uint32_t magic, const uint32_t key_size, const uint32_t val_size) : magic_(magic), crc_(0), key_size_(key_size), val_size_(val_size) {} diff --git a/utilities/simulator_cache/sim_cache.cc b/utilities/simulator_cache/sim_cache.cc index e3d801657..020cdaa3c 100644 --- a/utilities/simulator_cache/sim_cache.cc +++ b/utilities/simulator_cache/sim_cache.cc @@ -155,7 +155,8 @@ class SimCacheImpl : public SimCache { : cache_(cache), key_only_cache_(NewLRUCache(sim_capacity, num_shard_bits)), miss_times_(0), - hit_times_(0) {} + hit_times_(0), + stats_(nullptr) {} virtual ~SimCacheImpl() {} virtual void SetCapacity(size_t capacity) override {