]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commitdiff
Fix implicit conversion between int64_t to int
authorIslam AbdelRahman <tec@fb.com>
Tue, 29 Nov 2016 18:40:31 +0000 (10:40 -0800)
committerIslam AbdelRahman <tec@fb.com>
Tue, 29 Nov 2016 20:05:21 +0000 (12:05 -0800)
Summary:
Make conversion explicit, implicit conversion breaks the build
Closes https://github.com/facebook/rocksdb/pull/1589

Differential Revision: D4245158

Pulled By: IslamAbdelRahman

fbshipit-source-id: aaec00d

db/column_family.cc

index 1ddd19fe103228839091c444e0ef6de3cb0ff66d..3f876ee5d371925f79ba406a280f8f4070928ff9 100644 (file)
@@ -571,7 +571,8 @@ int GetL0ThresholdSpeedupCompaction(int level0_file_num_compaction_trigger,
   if (res >= port::kMaxInt32) {
     return port::kMaxInt32;
   } else {
-    return res;
+    // res fits in int
+    return static_cast<int>(res);
   }
 }
 }  // namespace