]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commitdiff
Update to latest Snappy to fix compilation issue on latest MacOS XCode (#6498)
authorAdam Retter <adam.retter@googlemail.com>
Tue, 10 Mar 2020 17:16:37 +0000 (18:16 +0100)
committerGitHub <noreply@github.com>
Tue, 10 Mar 2020 17:16:37 +0000 (10:16 -0700)
* Update to latest Snappy to fix compilation issue on latest MacOS XCode

* Fix build issues on MSVC with db_stress_tool types

Makefile
db_stress_tool/db_stress_common.cc
db_stress_tool/db_stress_test_base.cc

index bad05c1b560574c7ddfbf8e18c5ed59dcba82212..404c7da437c793333754f7a800990aad100bdb61 100644 (file)
--- 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
index 454256dd5511321e57986ff7dac4681bf7e8ce4e..c7c5e45ba9ce19ae6b301d8ab3c92dba22686cdd 100644 (file)
@@ -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<int64_t>(std::floor((low + high) / 2));
     if (sum_probs[mid] >= rand_seed && sum_probs[mid - 1] < rand_seed) {
       zipf = mid;
       break;
index dd9f00c8784b6a98fc7f6d7d79f5ce7aa494e73d..0c17f2e3397eb26c25aac8949e18269008392949 100644 (file)
@@ -771,7 +771,7 @@ std::vector<std::string> StressTest::GetWhiteBoxKeys(ThreadState* thread,
           k[i] = static_cast<char>(cur - 1);
           break;
         } else if (i > 0) {
-          k[i] = 0xFF;
+          k[i] = static_cast<char>(0xFF);
         }
       }
     } else if (thread->rand.OneIn(2)) {