From 30ea36a7abe365faaeef780a03f9d9a8015d96f0 Mon Sep 17 00:00:00 2001 From: daishengdong Date: Thu, 31 Oct 2019 15:08:13 +0800 Subject: [PATCH] fix compile warning --- kernel/core/include/tos_klib.h | 1 - kernel/core/include/tos_ktypes.h | 1 + kernel/core/include/tos_task.h | 6 +++--- kernel/core/tos_binary_heap.c | 2 -- kernel/core/tos_priority_queue.c | 2 -- 5 files changed, 4 insertions(+), 8 deletions(-) diff --git a/kernel/core/include/tos_klib.h b/kernel/core/include/tos_klib.h index 513e0857..384268fb 100644 --- a/kernel/core/include/tos_klib.h +++ b/kernel/core/include/tos_klib.h @@ -21,7 +21,6 @@ #include #include #include -#include #include #define TOS_OFFSET_OF_FIELD(type, field) \ diff --git a/kernel/core/include/tos_ktypes.h b/kernel/core/include/tos_ktypes.h index cc1d91d7..5bb9f4b9 100644 --- a/kernel/core/include/tos_ktypes.h +++ b/kernel/core/include/tos_ktypes.h @@ -19,6 +19,7 @@ #define _TOS_KTYPES_H_ #include +#include typedef uint8_t k_prio_t; typedef uint8_t k_stack_t; diff --git a/kernel/core/include/tos_task.h b/kernel/core/include/tos_task.h index e4040e9a..c25fc508 100644 --- a/kernel/core/include/tos_task.h +++ b/kernel/core/include/tos_task.h @@ -440,9 +440,9 @@ __DEBUG__ __STATIC_INLINE__ void task_default_walker(k_task_t *task) tos_kprintln("tsk stat: %s", state_str); tos_kprintln("stk size: %d", task->stk_size); - tos_kprintln("stk base: 0x%x", task->stk_base); - tos_kprintln("stk top : 0x%x", (cpu_addr_t)task->stk_base + task->stk_size); - tos_kprintln(""); + tos_kprintln("stk base: 0x%p", task->stk_base); + tos_kprintln("stk top : 0x%p", task->stk_base + task->stk_size); + tos_kprintf("\n"); } #endif /* _TOS_TASK_H_ */ diff --git a/kernel/core/tos_binary_heap.c b/kernel/core/tos_binary_heap.c index f1b401e4..7046fbe6 100644 --- a/kernel/core/tos_binary_heap.c +++ b/kernel/core/tos_binary_heap.c @@ -196,11 +196,9 @@ __API__ k_err_t tos_bin_heap_destroy_dyn(k_bin_heap_t *bin_heap) TOS_PTR_SANITY_CHECK(bin_heap); TOS_OBJ_VERIFY(bin_heap, KNL_OBJ_TYPE_BINARY_HEAP); -#if TOS_CFG_MMHEAP_EN > 0u if (!knl_object_alloc_is_dynamic(&bin_heap->knl_obj)) { return K_ERR_OBJ_INVALID_ALLOC_TYPE; } -#endif tos_mmheap_free(bin_heap->pool); diff --git a/kernel/core/tos_priority_queue.c b/kernel/core/tos_priority_queue.c index 9eaf0c54..b31ad18f 100644 --- a/kernel/core/tos_priority_queue.c +++ b/kernel/core/tos_priority_queue.c @@ -255,11 +255,9 @@ __API__ k_err_t tos_prio_q_destroy_dyn(k_prio_q_t *prio_q) TOS_PTR_SANITY_CHECK(prio_q); TOS_OBJ_VERIFY(prio_q, KNL_OBJ_TYPE_PRIORITY_QUEUE); -#if TOS_CFG_MMHEAP_EN > 0u if (!knl_object_alloc_is_dynamic(&prio_q->knl_obj)) { return K_ERR_OBJ_INVALID_ALLOC_TYPE; } -#endif prio_q_pool_mgr_deinit(&prio_q->pool_mgr); prio_q_prio_mgr_deinit(&prio_q->prio_mgr);