From 2422f3d9fb60d5a72ea8c98727dc6c4e2dda1097 Mon Sep 17 00:00:00 2001 From: sdong Date: Tue, 28 Jan 2020 14:54:53 -0800 Subject: [PATCH] Fix db_bloom_filter_test clang LITE build 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 Test Plan: USE_CLANG=1 LITE=1 make db_bloom_filter_test and without LITE=1 --- db/db_bloom_filter_test.cc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/db/db_bloom_filter_test.cc b/db/db_bloom_filter_test.cc index b31c935e85c..417552ad86c 100644 --- a/db/db_bloom_filter_test.cc +++ b/db/db_bloom_filter_test.cc @@ -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. @@ -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> {