From 9c6c232e476a5bf7ac6259bd9c6ddf4be4608b18 Mon Sep 17 00:00:00 2001 From: Dhruba Borthakur Date: Sun, 11 Nov 2012 00:20:40 -0800 Subject: [PATCH] Compilation error while compiling with OPT=-g MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: make clean check OPT=-g fails leveldb::DBStatistics::getTickerCount(leveldb::Tickers)’: ./db/db_statistics.h:34: error: ‘MAX_NO_TICKERS’ was not declared in this scope util/ldb_cmd.cc:255: warning: left shift count >= width of type Test Plan: make clean check OPT=-g Reviewers: CC: Task ID: # Blame Rev: --- db/db_statistics.h | 4 ++-- util/ldb_cmd.cc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/db/db_statistics.h b/db/db_statistics.h index 612817e7a..532def297 100644 --- a/db/db_statistics.h +++ b/db/db_statistics.h @@ -31,12 +31,12 @@ class DBStatistics: public Statistics { } long getTickerCount(Tickers tickerType) { - assert(tickerType < MAX_NO_TICKERS); + assert(tickerType < TICKER_ENUM_MAX); return allTickers_[tickerType].getCount(); } void recordTick(Tickers tickerType) { - assert(tickerType < MAX_NO_TICKERS); + assert(tickerType < TICKER_ENUM_MAX); allTickers_[tickerType].recordTick(); } diff --git a/util/ldb_cmd.cc b/util/ldb_cmd.cc index 545d78983..6067f3b85 100644 --- a/util/ldb_cmd.cc +++ b/util/ldb_cmd.cc @@ -252,7 +252,7 @@ leveldb::Options ReduceDBLevels::PrepareOptionsForOpenDB() { leveldb::Options opt = LDBCommand::PrepareOptionsForOpenDB(); opt.num_levels = old_levels_; // Disable size compaction - opt.max_bytes_for_level_base = 1 << 60; + opt.max_bytes_for_level_base = 1L << 60; opt.max_bytes_for_level_multiplier = 1; opt.max_mem_compaction_level = 0; return opt;