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
main
Igor Canadi 9 years ago
parent 174e2be5f0
commit 7ee445dd68
  1. 5
      util/arena.cc

@ -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…
Cancel
Save