From 3463a756d9ece07266be5636a7b2cd45cadbe784 Mon Sep 17 00:00:00 2001 From: Bernard Xiong Date: Fri, 7 Jun 2019 22:44:24 +0800 Subject: [PATCH] [kernel] skip warning when disable debug. --- src/object.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/object.c b/src/object.c index e85737ce8f..4ee2f6a1a1 100644 --- a/src/object.c +++ b/src/object.c @@ -262,7 +262,10 @@ void rt_object_init(struct rt_object *object, struct rt_object *obj; obj = rt_list_entry(node, struct rt_object, list); - RT_ASSERT(obj != object); + if (obj) /* skip warning when disable debug */ + { + RT_ASSERT(obj != object); + } } /* leave critical */ rt_exit_critical();