From 04a2e92d54801b35c8cc8f032a9a366fe4cd17ec Mon Sep 17 00:00:00 2001 From: Tony Wu Date: Tue, 17 Apr 2018 16:21:16 +0800 Subject: [PATCH] rtl8195am - fix tcm_heap.c warnings Fix the following warnings: [Warning] tcm_heap.c@70,18: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'MemChunk * {aka struct _MemChunk *}' [-Wformat=] [Warning] tcm_heap.c@70,28: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'MemChunk * {aka struct _MemChunk *}' [-Wformat=] [Warning] tcm_heap.c@336,6: unused variable 'i' [-Wunused-variable] Signed-off-by: Tony Wu --- targets/TARGET_Realtek/TARGET_AMEBA/sdk/os/os_dep/tcm_heap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/targets/TARGET_Realtek/TARGET_AMEBA/sdk/os/os_dep/tcm_heap.c b/targets/TARGET_Realtek/TARGET_AMEBA/sdk/os/os_dep/tcm_heap.c index 33e889b08a..40c1df764e 100644 --- a/targets/TARGET_Realtek/TARGET_AMEBA/sdk/os/os_dep/tcm_heap.c +++ b/targets/TARGET_Realtek/TARGET_AMEBA/sdk/os/os_dep/tcm_heap.c @@ -67,7 +67,7 @@ void tcm_heap_dump(void) chunk; prev = chunk, chunk = chunk->next) { - printf(" prev %x, chunk %x, size %d \n\r", prev, chunk, chunk->size); + printf(" prev %p, chunk %p, size %d \n\r", prev, chunk, chunk->size); } printf("--------------\n\r"); } @@ -333,7 +333,7 @@ int tcm_heap_testRun(void) alloc_test(ALLOC_SIZE2, TEST_LEN2); /* Try to allocate the whole heap */ uint8_t *b = tcm_heap_allocmem(HEAP_SIZE); - int i, j; + int j; //ASSERT(b); //ASSERT(heap_freeSpace(&h) == 0);