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:
Aliaksey Kandratsenka 2013-11-09 17:19:34 -08:00
parent 91bffcbad6
commit 1d707cd4a3

View File

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