mirror of
https://github.com/facebook/rocksdb.git
synced 2024-11-26 07:30:54 +00:00
utilities: Fix coverity issues in blob_db and col_buf_decoder
Summary: utilities/blob_db/blob_db_impl.cc 265 : bdb_options_.blob_dir; 3. uninit_member: Non-static class member env_ is not initialized in this constructor nor in any functions that it calls. 5. uninit_member: Non-static class member ttl_extractor_ is not initialized in this constructor nor in any functions that it calls. 7. uninit_member: Non-static class member open_p1_done_ is not initialized in this constructor nor in any functions that it calls. CID 1418245 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR) 9. uninit_member: Non-static class member debug_level_ is not initialized in this constructor nor in any functions that it calls. 266} 4. past_the_end: Function end creates an iterator. CID 1418258 (#1 of 1): Using invalid iterator (INVALIDATE_ITERATOR) 5. deref_iterator: Dereferencing iterator file_nums.end() though it is already past the end of its container. utilities/col_buf_decoder.h: nullable_(nullable), 2. uninit_member: Non-static class member remain_runs_ is not initialized in this constructor nor in any functions that it calls. 4. uninit_member: Non-static class member run_val_ is not initialized in this constructor nor in any functions that it calls. CID 1396134 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR) 6. uninit_member: Non-static class member last_val_ is not initialized in this constructor nor in any functions that it calls. 46 big_endian_(big_endian) {} Closes https://github.com/facebook/rocksdb/pull/3134 Differential Revision: D6340607 Pulled By: sagar0 fbshipit-source-id: 25c52566e2ff979fe6c7abb0f40c27fc16597054
This commit is contained in:
parent
cf0d6aa007
commit
7b57510a17
|
@ -159,6 +159,8 @@ BlobDBOptions BlobDBImpl::GetBlobDBOptions() const { return bdb_options_; }
|
|||
BlobDBImpl::BlobDBImpl(DB* db, const BlobDBOptions& blob_db_options)
|
||||
: BlobDB(db),
|
||||
db_impl_(static_cast_with_check<DBImpl, DB>(db)),
|
||||
env_(nullptr),
|
||||
ttl_extractor_(nullptr),
|
||||
bdb_options_(blob_db_options),
|
||||
db_options_(db->GetOptions()),
|
||||
env_options_(db_->GetOptions()),
|
||||
|
@ -170,6 +172,8 @@ BlobDBImpl::BlobDBImpl(DB* db, const BlobDBOptions& blob_db_options)
|
|||
current_epoch_(0),
|
||||
open_file_count_(0),
|
||||
total_blob_space_(0),
|
||||
open_p1_done_(false),
|
||||
debug_level_(0),
|
||||
oldest_file_evicted_(false) {
|
||||
if (!bdb_options_.blob_dir.empty())
|
||||
blob_dir_ = (bdb_options_.path_relative)
|
||||
|
|
|
@ -43,7 +43,10 @@ class FixedLengthColBufDecoder : public ColBufDecoder {
|
|||
: size_(size),
|
||||
col_compression_type_(col_compression_type),
|
||||
nullable_(nullable),
|
||||
big_endian_(big_endian) {}
|
||||
big_endian_(big_endian),
|
||||
remain_runs_(0),
|
||||
run_val_(0),
|
||||
last_val_(0) {}
|
||||
|
||||
size_t Init(const char* src) override;
|
||||
size_t Decode(const char* src, char** dest) override;
|
||||
|
|
Loading…
Reference in a new issue