From: Adam Retter Date: Tue, 10 Mar 2020 17:16:37 +0000 (+0100) Subject: Update to latest Snappy to fix compilation issue on latest MacOS XCode (#6498) X-Git-Tag: v6.7.3~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=aaabdc85d9ca15c60b82383fbf1e51e3a6132ef5;p=rocksdb.git Update to latest Snappy to fix compilation issue on latest MacOS XCode (#6498) * Update to latest Snappy to fix compilation issue on latest MacOS XCode * Fix build issues on MSVC with db_stress_tool types --- diff --git a/Makefile b/Makefile index bad05c1b..404c7da4 100644 --- a/Makefile +++ b/Makefile @@ -1792,8 +1792,8 @@ ZLIB_DOWNLOAD_BASE ?= http://zlib.net BZIP2_VER ?= 1.0.6 BZIP2_SHA256 ?= a2848f34fcd5d6cf47def00461fcb528a0484d8edef8208d6d2e2909dc61d9cd BZIP2_DOWNLOAD_BASE ?= https://downloads.sourceforge.net/project/bzip2 -SNAPPY_VER ?= 1.1.7 -SNAPPY_SHA256 ?= 3dfa02e873ff51a11ee02b9ca391807f0c8ea0529a4924afa645fbf97163f9d4 +SNAPPY_VER ?= 1.1.8 +SNAPPY_SHA256 ?= 16b677f07832a612b0836178db7f374e414f94657c138e6993cbfc5dcc58651f SNAPPY_DOWNLOAD_BASE ?= https://github.com/google/snappy/archive LZ4_VER ?= 1.9.2 LZ4_SHA256 ?= 658ba6191fa44c92280d4aa2c271b0f4fbc0e34d249578dd05e50e76d0e5efcc diff --git a/db_stress_tool/db_stress_common.cc b/db_stress_tool/db_stress_common.cc index 454256dd..c7c5e45b 100644 --- a/db_stress_tool/db_stress_common.cc +++ b/db_stress_tool/db_stress_common.cc @@ -62,7 +62,7 @@ void InitializeHotKeyGenerator(double alpha) { int64_t GetOneHotKeyID(double rand_seed, int64_t max_key) { int64_t low = 1, mid, high = zipf_sum_size, zipf = 0; while (low <= high) { - mid = std::floor((low + high) / 2); + mid = static_cast(std::floor((low + high) / 2)); if (sum_probs[mid] >= rand_seed && sum_probs[mid - 1] < rand_seed) { zipf = mid; break; diff --git a/db_stress_tool/db_stress_test_base.cc b/db_stress_tool/db_stress_test_base.cc index dd9f00c8..0c17f2e3 100644 --- a/db_stress_tool/db_stress_test_base.cc +++ b/db_stress_tool/db_stress_test_base.cc @@ -771,7 +771,7 @@ std::vector StressTest::GetWhiteBoxKeys(ThreadState* thread, k[i] = static_cast(cur - 1); break; } else if (i > 0) { - k[i] = 0xFF; + k[i] = static_cast(0xFF); } } } else if (thread->rand.OneIn(2)) {