mirror of
https://github.com/gperftools/gperftools
synced 2025-03-03 11:27:29 +00:00
issue-489: fixed warning
Computing certain values just for ASSERT raises just warning from compiler because if NDEBUG is set those are dead code.
This commit is contained in:
parent
91bffcbad6
commit
1d707cd4a3
@ -271,12 +271,14 @@ Span* PageHeap::Carve(Span* span, Length n) {
|
||||
// The previous span of |leftover| was just splitted -- no need to
|
||||
// coalesce them. The next span of |leftover| was not previously coalesced
|
||||
// with |span|, i.e. is NULL or has got location other than |old_location|.
|
||||
#ifndef NDEBUG
|
||||
const PageID p = leftover->start;
|
||||
const Length len = leftover->length;
|
||||
Span* next = GetDescriptor(p+len);
|
||||
ASSERT (next == NULL ||
|
||||
next->location == Span::IN_USE ||
|
||||
next->location != leftover->location);
|
||||
#endif
|
||||
|
||||
PrependToFreeList(leftover); // Skip coalescing - no candidates possible
|
||||
span->length = n;
|
||||
|
Loading…
Reference in New Issue
Block a user