From 098da834833bf669a8ba14e68839676f4d95d58e Mon Sep 17 00:00:00 2001 From: sdong Date: Tue, 7 Jun 2016 16:55:24 -0700 Subject: [PATCH] Fix CLANG build break caused by the recent Persistent Cache change Test Plan: USE_CLANG=1 make all check -j32 Reviewers: andrewkr, IslamAbdelRahman Reviewed By: IslamAbdelRahman Subscribers: leveldb, andrewkr, dhruba Differential Revision: https://reviews.facebook.net/D59313 --- utilities/persistent_cache/persistent_cache_test.h | 9 +++++---- utilities/persistent_cache/volatile_tier_impl.cc | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/utilities/persistent_cache/persistent_cache_test.h b/utilities/persistent_cache/persistent_cache_test.h index dfd912e3a..4659b728c 100644 --- a/utilities/persistent_cache/persistent_cache_test.h +++ b/utilities/persistent_cache/persistent_cache_test.h @@ -58,7 +58,7 @@ class PersistentCacheTierTest : public testing::Test { std::thread th(fn); threads.push_back(std::move(th)); } - return std::move(threads); + return threads; } // Wait for threads to join @@ -75,7 +75,7 @@ class PersistentCacheTierTest : public testing::Test { max_keys_ = max_keys; // spawn threads auto fn = std::bind(&PersistentCacheTierTest::InsertImpl, this); - auto threads = std::move(SpawnThreads(nthreads, fn)); + auto threads = SpawnThreads(nthreads, fn); // join with threads Join(std::move(threads)); // Flush cache @@ -90,7 +90,7 @@ class PersistentCacheTierTest : public testing::Test { // spawn threads auto fn = std::bind(&PersistentCacheTierTest::VerifyImpl, this, eviction_enabled); - auto threads = std::move(SpawnThreads(nthreads, fn)); + auto threads = SpawnThreads(nthreads, fn); // join with threads Join(std::move(threads)); } @@ -232,7 +232,8 @@ class PersistentCacheDBTest : public DBTestBase { static uint32_t TestGetTickerCount(const Options& options, Tickers ticker_type) { - return options.statistics->getTickerCount(ticker_type); + return static_cast( + options.statistics->getTickerCount(ticker_type)); } // insert data to table diff --git a/utilities/persistent_cache/volatile_tier_impl.cc b/utilities/persistent_cache/volatile_tier_impl.cc index 362acb174..5bc6fe9b4 100644 --- a/utilities/persistent_cache/volatile_tier_impl.cc +++ b/utilities/persistent_cache/volatile_tier_impl.cc @@ -32,7 +32,7 @@ std::vector VolatileCacheTier::Stats() { std::vector tier_stats; if (next_tier()) { - tier_stats = std::move(next_tier()->Stats()); + tier_stats = next_tier()->Stats(); } tier_stats.push_back(stat); return tier_stats; @@ -49,7 +49,7 @@ std::string VolatileCacheTier::PrintStats() { << "pagecache.volatilecache.miss_pct: " << stats_.CacheMissPct() << std::endl << PersistentCacheTier::PrintStats(); - return std::move(ss.str()); + return ss.str(); } Status VolatileCacheTier::Insert(const Slice& page_key, const char* data,