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
This commit is contained in:
Prashant D 2017-10-26 20:54:48 -07:00 committed by Facebook Github Bot
parent 95667383db
commit 67b29e26be

View File

@ -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),