[update][kernel]规范rt_object_t强制转换的使用,消除上次提交的编译警告
This commit is contained in:
parent
2bf53d315d
commit
72d7f6c0ad
|
@ -358,8 +358,6 @@ RTM_EXPORT(rt_thread_startup);
|
|||
*/
|
||||
rt_err_t rt_thread_detach(rt_thread_t thread)
|
||||
{
|
||||
rt_base_t lock;
|
||||
|
||||
/* thread check */
|
||||
RT_ASSERT(thread != RT_NULL);
|
||||
RT_ASSERT(rt_object_get_type((rt_object_t)thread) == RT_Object_Class_Thread);
|
||||
|
|
|
@ -201,7 +201,7 @@ void rt_timer_init(rt_timer_t timer,
|
|||
RT_ASSERT(timer != RT_NULL);
|
||||
|
||||
/* timer object initialization */
|
||||
rt_object_init((rt_object_t)timer, RT_Object_Class_Timer, name);
|
||||
rt_object_init(&(timer->parent), RT_Object_Class_Timer, name);
|
||||
|
||||
_rt_timer_init(timer, timeout, parameter, time, flag);
|
||||
}
|
||||
|
@ -298,7 +298,7 @@ rt_err_t rt_timer_delete(rt_timer_t timer)
|
|||
/* enable interrupt */
|
||||
rt_hw_interrupt_enable(level);
|
||||
|
||||
rt_object_delete((rt_object_t)timer);
|
||||
rt_object_delete(&(timer->parent));
|
||||
|
||||
return RT_EOK;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue