Skip to content

Commit

Permalink
Fix db_bloom_filter_test clang LITE build (facebook#6340)
Browse files Browse the repository at this point in the history
Summary:
db_bloom_filter_test break with clang LITE build with following message:

db/db_bloom_filter_test.cc:23:29: error: unused variable 'kPlainTable' [-Werror,-Wunused-const-variable]
static constexpr PseudoMode kPlainTable = -1;
                            ^

Fix it by moving the declaration out of LITE build
Pull Request resolved: facebook#6340

Test Plan:
USE_CLANG=1 LITE=1 make db_bloom_filter_test
and without LITE=1

Differential Revision: D19609834

fbshipit-source-id: 0e88f5c6759238a94f9880d84c785ac18e7cdd7e
  • Loading branch information
siying authored and facebook-github-bot committed Jan 29, 2020
1 parent 2f973ca commit 02ac6c9
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions db/db_bloom_filter_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@ namespace rocksdb {

namespace {
using BFP = BloomFilterPolicy;

namespace BFP2 {
// Extends BFP::Mode with option to use Plain table
using PseudoMode = int;
static constexpr PseudoMode kPlainTable = -1;
} // namespace BFP2
} // namespace

// DB tests related to bloom filter.
Expand Down Expand Up @@ -1031,6 +1025,14 @@ TEST_F(DBBloomFilterTest, MemtablePrefixBloomOutOfDomain) {
}

#ifndef ROCKSDB_LITE
namespace {
namespace BFP2 {
// Extends BFP::Mode with option to use Plain table
using PseudoMode = int;
static constexpr PseudoMode kPlainTable = -1;
} // namespace BFP2
} // namespace

class BloomStatsTestWithParam
: public DBBloomFilterTest,
public testing::WithParamInterface<std::tuple<BFP2::PseudoMode, bool>> {
Expand Down

0 comments on commit 02ac6c9

Please sign in to comment.