diff --git a/table/block.h b/table/block.h index 470e52322..c6c03a300 100644 --- a/table/block.h +++ b/table/block.h @@ -49,8 +49,11 @@ class BlockReadAmpBitmap { } // num_bits_needed = ceil(block_size / bytes_per_bit) - size_t num_bits_needed = (block_size >> bytes_per_bit_pow_) + - (block_size % (1 << bytes_per_bit_pow_) != 0); + size_t num_bits_needed = + (block_size >> static_cast(bytes_per_bit_pow_)) + + (block_size % (static_cast(1) + << static_cast(bytes_per_bit_pow_)) != + 0); // bitmap_size = ceil(num_bits_needed / kBitsPerEntry) size_t bitmap_size = (num_bits_needed / kBitsPerEntry) + diff --git a/util/threadpool_imp.cc b/util/threadpool_imp.cc index 1c8153477..128124cb2 100644 --- a/util/threadpool_imp.cc +++ b/util/threadpool_imp.cc @@ -38,7 +38,7 @@ namespace { struct Lock { std::unique_lock ul_; - explicit Lock(const std::mutex& m) : ul_(m, std::defer_lock) {} + explicit Lock(std::mutex& m) : ul_(m, std::defer_lock) {} }; using Condition = std::condition_variable;