From 7e22b0297c77bbab85b35d93c2cf5d302dd20e4f Mon Sep 17 00:00:00 2001 From: guozhanxin Date: Wed, 22 Nov 2023 14:22:29 +0800 Subject: [PATCH] [src] Fix mdk compilation warning --- src/object.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/object.c b/src/object.c index 1a0b87b9cb..791e183d5c 100644 --- a/src/object.c +++ b/src/object.c @@ -258,7 +258,7 @@ rt_object_get_information(enum rt_object_class_type type) { int index; - type = type& ~RT_Object_Class_Static; + type = (enum rt_object_class_type)(type & ~RT_Object_Class_Static); for (index = 0; index < RT_Object_Info_Unknown; index ++) if (_object_container[index].type == type) return &_object_container[index]; @@ -320,7 +320,7 @@ int rt_object_get_pointers(enum rt_object_class_type type, rt_object_t *pointers if (maxlen <= 0) return 0; - information = rt_object_get_information((enum rt_object_class_type)type); + information = rt_object_get_information(type); if (information == RT_NULL) return 0; level = rt_spin_lock_irqsave(&(information->spinlock)); @@ -430,7 +430,7 @@ void rt_object_detach(rt_object_t object) RT_OBJECT_HOOK_CALL(rt_object_detach_hook, (object)); - information = rt_object_get_information(object->type); + information = rt_object_get_information((enum rt_object_class_type)object->type); RT_ASSERT(information != RT_NULL); level = rt_spin_lock_irqsave(&(information->spinlock)); @@ -528,7 +528,7 @@ void rt_object_delete(rt_object_t object) RT_OBJECT_HOOK_CALL(rt_object_detach_hook, (object)); - information = rt_object_get_information(object->type); + information = rt_object_get_information((enum rt_object_class_type)object->type); RT_ASSERT(information != RT_NULL); level = rt_spin_lock_irqsave(&(information->spinlock));