Fix compiler warning treated as error (#6547)
Summary: Define a private member variable only in debug mode. Without fix, build will fail ``` In file included from table/block_based/partitioned_index_iterator.cc:9: ./table/block_based/partitioned_index_iterator.h:125:32: error: private field 'icomp_' is not used [-Werror,-Wunused-private-field] const InternalKeyComparator& icomp_; ``` Test plan (dev server) 1. make check 2. Make sure fixed in Travis Pull Request resolved: https://github.com/facebook/rocksdb/pull/6547 Reviewed By: siying Differential Revision: D20480027 Pulled By: pdillinger fbshipit-source-id: 288bc94280e240c3136335b6c73eb1ccb0db459d
This commit is contained in:
parent
6c595f008a
commit
098dce2d1a
@ -29,7 +29,9 @@ class ParititionedIndexIterator : public InternalIteratorBase<IndexValue> {
|
|||||||
TableReaderCaller caller, size_t compaction_readahead_size = 0)
|
TableReaderCaller caller, size_t compaction_readahead_size = 0)
|
||||||
: table_(table),
|
: table_(table),
|
||||||
read_options_(read_options),
|
read_options_(read_options),
|
||||||
|
#ifndef NDEBUG
|
||||||
icomp_(icomp),
|
icomp_(icomp),
|
||||||
|
#endif
|
||||||
user_comparator_(icomp.user_comparator()),
|
user_comparator_(icomp.user_comparator()),
|
||||||
index_iter_(std::move(index_iter)),
|
index_iter_(std::move(index_iter)),
|
||||||
block_iter_points_to_real_block_(false),
|
block_iter_points_to_real_block_(false),
|
||||||
@ -122,7 +124,9 @@ class ParititionedIndexIterator : public InternalIteratorBase<IndexValue> {
|
|||||||
private:
|
private:
|
||||||
const BlockBasedTable* table_;
|
const BlockBasedTable* table_;
|
||||||
const ReadOptions read_options_;
|
const ReadOptions read_options_;
|
||||||
|
#ifndef NDEBUG
|
||||||
const InternalKeyComparator& icomp_;
|
const InternalKeyComparator& icomp_;
|
||||||
|
#endif
|
||||||
UserComparatorWrapper user_comparator_;
|
UserComparatorWrapper user_comparator_;
|
||||||
std::unique_ptr<InternalIteratorBase<IndexValue>> index_iter_;
|
std::unique_ptr<InternalIteratorBase<IndexValue>> index_iter_;
|
||||||
IndexBlockIter block_iter_;
|
IndexBlockIter block_iter_;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user