Skip to content

Commit

Permalink
Fix coverity issue for MutableDBOptions default constructor
Browse files Browse the repository at this point in the history
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 (ceph#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 facebook#3069

Differential Revision: D6170424

Pulled By: ajkr

fbshipit-source-id: 1f94e86b87611ad2330b8b1707911150978d68b8
  • Loading branch information
Prashant D authored and facebook-github-bot committed Oct 27, 2017
1 parent 9566738 commit 67b29e2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion options/db_options.cc
Expand Up @@ -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),
Expand Down

0 comments on commit 67b29e2

Please sign in to comment.