From aaf2bc4f415b288fc02e9071abbc8e4c55d5b7a4 Mon Sep 17 00:00:00 2001 From: Ruben Ayrapetyan Date: Wed, 9 Jul 2014 19:43:50 +0400 Subject: [PATCH] Fix mem-heap.c, mem-poolman.c and test_poolman.c compilation for '#ifndef MEM_STATS' case. --- src/liballocator/mem-heap.c | 2 +- src/liballocator/mem-poolman.c | 10 +++++----- tests/unit/test_poolman.c | 2 ++ 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/liballocator/mem-heap.c b/src/liballocator/mem-heap.c index 881831d38..dc97f21d2 100644 --- a/src/liballocator/mem-heap.c +++ b/src/liballocator/mem-heap.c @@ -119,7 +119,7 @@ static void mem_HeapStatFreeBlock( mem_BlockHeader_t *block_header_p); static void mem_HeapStatFreeBlockSplit( void); static void mem_HeapStatFreeBlockMerge( void); #else /* !MEM_STATS */ -# define mem_InitStats() +# define mem_HeapStatInit() # define mem_HeapStatAllocBlock( v) # define mem_HeapStatFreeBlock( v) # define mem_HeapStatFreeBlockSplit() diff --git a/src/liballocator/mem-poolman.c b/src/liballocator/mem-poolman.c index 1c52e42e1..f084ceec6 100644 --- a/src/liballocator/mem-poolman.c +++ b/src/liballocator/mem-poolman.c @@ -65,11 +65,11 @@ static void mem_PoolsStatFreePool( mem_PoolChunkType_t); static void mem_PoolsStatAllocChunk( mem_PoolChunkType_t); static void mem_PoolsStatFreeChunk( mem_PoolChunkType_t); #else /* !MEM_STATS */ -# define mem_PoolsStatsInit() -# define mem_PoolsStatAllocPool() -# define mem_PoolsStatsFreePool() -# define mem_PoolsStatAllocChunk() -# define mem_PoolsStatFreeChunk() +# define mem_PoolsStatInit() +# define mem_PoolsStatAllocPool(v) +# define mem_PoolsStatFreePool(v) +# define mem_PoolsStatAllocChunk(v) +# define mem_PoolsStatFreeChunk(v) #endif /* !MEM_STATS */ /** diff --git a/tests/unit/test_poolman.c b/tests/unit/test_poolman.c index 2c11deb7a..fa5fc56a9 100644 --- a/tests/unit/test_poolman.c +++ b/tests/unit/test_poolman.c @@ -93,8 +93,10 @@ main( int __unused argc, } } +#ifdef MEM_STATS mem_PoolsStats_t stats; mem_PoolsGetStats( &stats); +#endif /* MEM_STATS */ __printf("Pools stats:\n"); for(mem_PoolChunkType_t type = 0;