diff options
| author | Shell <[email protected]> | 2024-05-21 19:47:42 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-05-21 19:47:42 +0800 |
| commit | 6b12bce22fc6faaf1c3c9d06583e5679540df7ca (patch) | |
| tree | e33fa32b7f8e16ab1e49d6c12e142b141558586c | |
| parent | 5f947863b4358ba437878747072bc372cb1e855e (diff) | |
[quality] fixup compiler warning (#8961)
Signed-off-by: Shell <[email protected]>
| -rw-r--r-- | components/lwp/lwp_pid.c | 1 | ||||
| -rw-r--r-- | src/object.c | 8 |
2 files changed, 5 insertions, 4 deletions
diff --git a/components/lwp/lwp_pid.c b/components/lwp/lwp_pid.c index 5b9f1f4098..63a635d2f5 100644 --- a/components/lwp/lwp_pid.c +++ b/components/lwp/lwp_pid.c @@ -83,6 +83,7 @@ void lwp_pid_lock_take(void) rc = lwp_mutex_take_safe(&pid_mtx, RT_WAITING_FOREVER, 0); /* should never failed */ RT_ASSERT(rc == RT_EOK); + RT_UNUSED(rc); } void lwp_pid_lock_release(void) diff --git a/src/object.c b/src/object.c index 5c110f7b70..0cb1a188a3 100644 --- a/src/object.c +++ b/src/object.c @@ -346,9 +346,9 @@ void rt_object_init(struct rt_object *object, const char *name) { rt_base_t level; -#ifdef RT_USING_DEBUG +#ifdef RT_DEBUGING_ASSERT struct rt_list_node *node = RT_NULL; -#endif +#endif /* RT_DEBUGING_ASSERT */ struct rt_object_information *information; #ifdef RT_USING_MODULE struct rt_dlmodule *module = dlmodule_self(); @@ -358,7 +358,7 @@ void rt_object_init(struct rt_object *object, information = rt_object_get_information(type); RT_ASSERT(information != RT_NULL); -#ifdef RT_USING_DEBUG +#ifdef RT_DEBUGING_ASSERT /* check object type to avoid re-initialization */ /* enter critical */ @@ -375,7 +375,7 @@ void rt_object_init(struct rt_object *object, } /* leave critical */ rt_spin_unlock_irqrestore(&(information->spinlock), level); -#endif +#endif /* RT_DEBUGING_ASSERT */ /* initialize object's parameters */ /* set object type to static */ |
