From 51413e0a856f377a7d62dfe4606c29ba9051c872 Mon Sep 17 00:00:00 2001 From: Jay Zhuang Date: Mon, 30 Sep 2019 14:00:37 -0700 Subject: [PATCH] Fix a compile error (#5864) Summary: ``` tools/block_cache_analyzer/block_cache_trace_analyzer.cc:653:48: error: implicit conversion loses integer precision: 'uint64_t' (aka 'unsigned long long') to 'std::__1::linear_congruential_engine::result_type' (aka 'unsigned int') [-Werror,-Wshorten-64-to-32] std::default_random_engine rand_engine(env_->NowMicros()); ``` Pull Request resolved: https://github.com/facebook/rocksdb/pull/5864 Differential Revision: D17668962 fbshipit-source-id: e08fa58b2a78a8dd8b334862b5714208f696b8ab --- tools/block_cache_analyzer/block_cache_trace_analyzer.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/block_cache_analyzer/block_cache_trace_analyzer.cc b/tools/block_cache_analyzer/block_cache_trace_analyzer.cc index 709f07221..891af9a52 100644 --- a/tools/block_cache_analyzer/block_cache_trace_analyzer.cc +++ b/tools/block_cache_analyzer/block_cache_trace_analyzer.cc @@ -650,7 +650,7 @@ void BlockCacheTraceAnalyzer::WriteCorrelationFeaturesToFile( const std::map& label_features, const std::map& label_predictions, uint32_t max_number_of_values) const { - std::default_random_engine rand_engine(env_->NowMicros()); + std::default_random_engine rand_engine(static_cast(env_->NowMicros())); for (auto const& label_feature_vectors : label_features) { const Features& past = label_feature_vectors.second; auto it = label_predictions.find(label_feature_vectors.first);