From 67b29e26be322009760d6d9ed21752dfa7d18439 Mon Sep 17 00:00:00 2001 From: Prashant D Date: Thu, 26 Oct 2017 20:54:48 -0700 Subject: [PATCH] Fix coverity issue for MutableDBOptions default constructor Summary: 228MutableDBOptions::MutableDBOptions() 229 : max_background_jobs(2), 230 base_background_compactions(-1), 231 max_background_compactions(-1), 232 avoid_flush_during_shutdown(false), 233 delayed_write_rate(2 * 1024U * 1024U), 234 max_total_wal_size(0), 235 delete_obsolete_files_period_micros(6ULL * 60 * 60 * 1000000), 236 stats_dump_period_sec(600), 2. uninit_member: Non-static class member bytes_per_sync is not initialized in this constructor nor in any functions that it calls. CID 1419857 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR) 4. uninit_member: Non-static class member wal_bytes_per_sync is not initialized in this constructor nor in any functions that it calls. 237 max_open_files(-1) {} Closes https://github.com/facebook/rocksdb/pull/3069 Differential Revision: D6170424 Pulled By: ajkr fbshipit-source-id: 1f94e86b87611ad2330b8b1707911150978d68b8 --- options/db_options.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/options/db_options.cc b/options/db_options.cc index 4a1d49f81..af3f799e2 100644 --- a/options/db_options.cc +++ b/options/db_options.cc @@ -234,7 +234,9 @@ MutableDBOptions::MutableDBOptions() max_total_wal_size(0), delete_obsolete_files_period_micros(6ULL * 60 * 60 * 1000000), stats_dump_period_sec(600), - max_open_files(-1) {} + max_open_files(-1), + bytes_per_sync(0), + wal_bytes_per_sync(0) {} MutableDBOptions::MutableDBOptions(const DBOptions& options) : max_background_jobs(options.max_background_jobs),