mirror of
https://github.com/facebook/rocksdb.git
synced 2024-11-25 22:44:05 +00:00
Fix the compile warning
Summary: clang is a bit confused, see here: https://travis-ci.org/facebook/rocksdb/jobs/82214750 Test Plan: travis CI Reviewers: sdong Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D47601
This commit is contained in:
parent
174e2be5f0
commit
7ee445dd68
|
@ -82,7 +82,7 @@ char* Arena::AllocateFallback(size_t bytes, bool aligned) {
|
|||
}
|
||||
|
||||
// We waste the remaining space in the current block.
|
||||
size_t size;
|
||||
size_t size = 0;
|
||||
char* block_head = nullptr;
|
||||
#ifdef MAP_HUGETLB
|
||||
if (hugetlb_size_) {
|
||||
|
@ -90,7 +90,8 @@ char* Arena::AllocateFallback(size_t bytes, bool aligned) {
|
|||
block_head = AllocateFromHugePage(size);
|
||||
}
|
||||
#endif
|
||||
if (!block_head) {
|
||||
if (size == 0) {
|
||||
assert(block_head == nullptr);
|
||||
size = kBlockSize;
|
||||
block_head = AllocateNewBlock(size);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue