From a6e425dc44622beb0784cbc77378dbbffb6ba14e Mon Sep 17 00:00:00 2001 From: Jay Zhuang Date: Wed, 12 May 2021 10:44:28 -0700 Subject: [PATCH] Fix a minor clang release build failure (#8290) Summary: Error message: ``` cache/clock_cache.cc:434:14: error: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'uint32_t' (aka 'unsigned int') [-Werror,-Wshorten-64-to-32] *state = end_idx; ~ ^~~~~~~ ``` Make circleci to cover this case by install tbb. Pull Request resolved: https://github.com/facebook/rocksdb/pull/8290 Test Plan: `USE_CLANG=1 make -j1 release` Reviewed By: akankshamahajan15 Differential Revision: D28374672 Pulled By: jay-zhuang fbshipit-source-id: e8c3ee46f2a008e8a599413292e5a4b5151365df --- .circleci/config.yml | 2 +- cache/clock_cache.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3f8711875..51fcf2bae 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -237,7 +237,7 @@ jobs: resource_class: xlarge steps: - checkout # check out the code in the project directory - - run: sudo apt-get update -y && sudo apt-get install -y clang libgflags-dev + - run: sudo apt-get update -y && sudo apt-get install -y clang libgflags-dev libtbb-dev - run: CC=clang CXX=clang++ USE_CLANG=1 PORTABLE=1 make V=1 -j16 all | .circleci/cat_ignore_eagain - post-steps diff --git a/cache/clock_cache.cc b/cache/clock_cache.cc index 26287ff22..bca52493a 100644 --- a/cache/clock_cache.cc +++ b/cache/clock_cache.cc @@ -431,7 +431,7 @@ void ClockCacheShard::ApplyToSomeEntries( // Mark finished with all *state = UINT32_MAX; } else { - *state = end_idx; + *state = static_cast(end_idx); } // Do the iteration