提交 51c8133a 编写于 作者: H Herman Lee

Fix make unity build compiler warning about "stats" shadowing global variable

Summary:
Fix the make unity build. The local stats variable name was shadowing a
global stats variable.

Test Plan:
Run the build
OPT=-DTRAVIS V=1 make unity

Reviewers: sdong, igor

Reviewed By: igor

Subscribers: dhruba

Differential Revision: https://reviews.facebook.net/D36285
上级 df71c6b9
......@@ -86,7 +86,7 @@ void PrintLevelStats(char* buf, size_t len, const std::string& name,
static const std::string rocksdb_prefix = "rocksdb.";
static const std::string num_files_at_level_prefix = "num-files-at-level";
static const std::string stats = "stats";
static const std::string allstats = "stats";
static const std::string sstables = "sstables";
static const std::string cfstats = "cfstats";
static const std::string dbstats = "dbstats";
......@@ -118,7 +118,7 @@ static const std::string base_level = "base-level";
const std::string DB::Properties::kNumFilesAtLevelPrefix =
rocksdb_prefix + num_files_at_level_prefix;
const std::string DB::Properties::kStats = rocksdb_prefix + stats;
const std::string DB::Properties::kStats = rocksdb_prefix + allstats;
const std::string DB::Properties::kSSTables = rocksdb_prefix + sstables;
const std::string DB::Properties::kCFStats = rocksdb_prefix + cfstats;
const std::string DB::Properties::kDBStats = rocksdb_prefix + dbstats;
......@@ -172,7 +172,7 @@ DBPropertyType GetPropertyType(const Slice& property, bool* is_int_property,
return kNumFilesAtLevel;
} else if (in == levelstats) {
return kLevelStats;
} else if (in == stats) {
} else if (in == allstats) {
return kStats;
} else if (in == cfstats) {
return kCFStats;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册