From 51c8133a72dadabde26ae96a64f6e5dd6a9674d9 Mon Sep 17 00:00:00 2001 From: Herman Lee Date: Tue, 31 Mar 2015 19:03:18 -0700 Subject: [PATCH] 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 --- db/internal_stats.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/db/internal_stats.cc b/db/internal_stats.cc index 868c988e9..5ac3622c4 100644 --- a/db/internal_stats.cc +++ b/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 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;