summaryrefslogtreecommitdiff
path: root/src/object.c
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2019-06-07 22:44:24 +0800
committerBernard Xiong <[email protected]>2019-06-07 22:44:24 +0800
commit3463a756d9ece07266be5636a7b2cd45cadbe784 (patch)
treec5b20d0c9a17bea6dec6613796ef873f2087f0fe /src/object.c
parentc8f0ae3f117dd5dd103e2a9ba6bfae93fef88a1a (diff)
[kernel] skip warning when disable debug.
Diffstat (limited to 'src/object.c')
-rw-r--r--src/object.c5
1 files changed, 4 insertions, 1 deletions
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();