Skip to content

Commit 6b12bce

Browse files
authored
[quality] fixup compiler warning (#8961)
Signed-off-by: Shell <smokewood@qq.com>
1 parent 5f94786 commit 6b12bce

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

components/lwp/lwp_pid.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ void lwp_pid_lock_take(void)
8383
rc = lwp_mutex_take_safe(&pid_mtx, RT_WAITING_FOREVER, 0);
8484
/* should never failed */
8585
RT_ASSERT(rc == RT_EOK);
86+
RT_UNUSED(rc);
8687
}
8788

8889
void lwp_pid_lock_release(void)

src/object.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -346,9 +346,9 @@ void rt_object_init(struct rt_object *object,
346346
const char *name)
347347
{
348348
rt_base_t level;
349-
#ifdef RT_USING_DEBUG
349+
#ifdef RT_DEBUGING_ASSERT
350350
struct rt_list_node *node = RT_NULL;
351-
#endif
351+
#endif /* RT_DEBUGING_ASSERT */
352352
struct rt_object_information *information;
353353
#ifdef RT_USING_MODULE
354354
struct rt_dlmodule *module = dlmodule_self();
@@ -358,7 +358,7 @@ void rt_object_init(struct rt_object *object,
358358
information = rt_object_get_information(type);
359359
RT_ASSERT(information != RT_NULL);
360360

361-
#ifdef RT_USING_DEBUG
361+
#ifdef RT_DEBUGING_ASSERT
362362
/* check object type to avoid re-initialization */
363363

364364
/* enter critical */
@@ -375,7 +375,7 @@ void rt_object_init(struct rt_object *object,
375375
}
376376
/* leave critical */
377377
rt_spin_unlock_irqrestore(&(information->spinlock), level);
378-
#endif
378+
#endif /* RT_DEBUGING_ASSERT */
379379

380380
/* initialize object's parameters */
381381
/* set object type to static */

0 commit comments

Comments
 (0)