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
main
Herman Lee 10 years ago
parent df71c6b9ed
commit 51c8133a72
  1. 6
      db/internal_stats.cc

@ -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 rocksdb_prefix = "rocksdb.";
static const std::string num_files_at_level_prefix = "num-files-at-level"; 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 sstables = "sstables";
static const std::string cfstats = "cfstats"; static const std::string cfstats = "cfstats";
static const std::string dbstats = "dbstats"; static const std::string dbstats = "dbstats";
@ -118,7 +118,7 @@ static const std::string base_level = "base-level";
const std::string DB::Properties::kNumFilesAtLevelPrefix = const std::string DB::Properties::kNumFilesAtLevelPrefix =
rocksdb_prefix + num_files_at_level_prefix; 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::kSSTables = rocksdb_prefix + sstables;
const std::string DB::Properties::kCFStats = rocksdb_prefix + cfstats; const std::string DB::Properties::kCFStats = rocksdb_prefix + cfstats;
const std::string DB::Properties::kDBStats = rocksdb_prefix + dbstats; const std::string DB::Properties::kDBStats = rocksdb_prefix + dbstats;
@ -172,7 +172,7 @@ DBPropertyType GetPropertyType(const Slice& property, bool* is_int_property,
return kNumFilesAtLevel; return kNumFilesAtLevel;
} else if (in == levelstats) { } else if (in == levelstats) {
return kLevelStats; return kLevelStats;
} else if (in == stats) { } else if (in == allstats) {
return kStats; return kStats;
} else if (in == cfstats) { } else if (in == cfstats) {
return kCFStats; return kCFStats;

Loading…
Cancel
Save