Silence compiler warnings for unreachable code.
Reported by Ingvar Hagelund.
This commit is contained in:
parent
d01fd19755
commit
b5c2a347d7
@ -659,12 +659,13 @@ arena_mapbits_size_decode(size_t mapbits)
|
|||||||
{
|
{
|
||||||
size_t size;
|
size_t size;
|
||||||
|
|
||||||
if (CHUNK_MAP_SIZE_SHIFT > 0)
|
#if CHUNK_MAP_SIZE_SHIFT > 0
|
||||||
size = (mapbits & CHUNK_MAP_SIZE_MASK) >> CHUNK_MAP_SIZE_SHIFT;
|
size = (mapbits & CHUNK_MAP_SIZE_MASK) >> CHUNK_MAP_SIZE_SHIFT;
|
||||||
else if (CHUNK_MAP_SIZE_SHIFT == 0)
|
#elif CHUNK_MAP_SIZE_SHIFT == 0
|
||||||
size = mapbits & CHUNK_MAP_SIZE_MASK;
|
size = mapbits & CHUNK_MAP_SIZE_MASK;
|
||||||
else
|
#else
|
||||||
size = (mapbits & CHUNK_MAP_SIZE_MASK) << -CHUNK_MAP_SIZE_SHIFT;
|
size = (mapbits & CHUNK_MAP_SIZE_MASK) << -CHUNK_MAP_SIZE_SHIFT;
|
||||||
|
#endif
|
||||||
|
|
||||||
return (size);
|
return (size);
|
||||||
}
|
}
|
||||||
@ -776,12 +777,13 @@ arena_mapbits_size_encode(size_t size)
|
|||||||
{
|
{
|
||||||
size_t mapbits;
|
size_t mapbits;
|
||||||
|
|
||||||
if (CHUNK_MAP_SIZE_SHIFT > 0)
|
#if CHUNK_MAP_SIZE_SHIFT > 0
|
||||||
mapbits = size << CHUNK_MAP_SIZE_SHIFT;
|
mapbits = size << CHUNK_MAP_SIZE_SHIFT;
|
||||||
else if (CHUNK_MAP_SIZE_SHIFT == 0)
|
#elif CHUNK_MAP_SIZE_SHIFT == 0
|
||||||
mapbits = size;
|
mapbits = size;
|
||||||
else
|
#else
|
||||||
mapbits = size >> -CHUNK_MAP_SIZE_SHIFT;
|
mapbits = size >> -CHUNK_MAP_SIZE_SHIFT;
|
||||||
|
#endif
|
||||||
|
|
||||||
assert((mapbits & ~CHUNK_MAP_SIZE_MASK) == 0);
|
assert((mapbits & ~CHUNK_MAP_SIZE_MASK) == 0);
|
||||||
return (mapbits);
|
return (mapbits);
|
||||||
|
Loading…
Reference in New Issue
Block a user