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:
Igor Canadi 2015-09-25 13:17:19 -07:00
parent 174e2be5f0
commit 7ee445dd68

View file

@ -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);
}