From 0f428c56193c62258ab09745b41afaf127f98636 Mon Sep 17 00:00:00 2001 From: Andrew Kryczka Date: Thu, 28 Apr 2016 10:42:10 -0700 Subject: [PATCH] Fix compression dictionary clang osx error Summary: There was one narrowing conversion in D52287 that only showed up with clang on osx. Test Plan: $ make clean && USE_CLANG=1 DISABLE_JEMALLOC=1 TEST_TMPDIR=/dev/shm/rocksdb OPT=-g make -j32 check Reviewers: sdong, lightmark, IslamAbdelRahman Reviewed By: IslamAbdelRahman Subscribers: andrewkr, dhruba, leveldb Differential Revision: https://reviews.facebook.net/D57357 --- db/db_test2.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/db_test2.cc b/db/db_test2.cc index 641cf3c27..b18c460f0 100644 --- a/db/db_test2.cc +++ b/db/db_test2.cc @@ -912,9 +912,9 @@ TEST_F(DBTest2, PresetCompressionDict) { std::vector files; GetSstFiles(dbname_, &files); for (const auto& file : files) { - size_t curr_bytes; + uint64_t curr_bytes; env_->GetFileSize(dbname_ + "/" + file, &curr_bytes); - out_bytes += curr_bytes; + out_bytes += static_cast(curr_bytes); } for (size_t j = 0; j < kNumL0Files * (kL0FileBytes / kBlockSizeBytes);