fix variable set but not used

These variables will trigger variable 'ret' set but not used warnings due to different configurations.

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
This commit is contained in:
yinshengkai
2024-02-21 17:45:34 +08:00
committed by Alan Carvalho de Assis
parent 3b6e7c1927
commit d2d93ba58c
6 changed files with 7 additions and 9 deletions
+1
View File
@@ -55,6 +55,7 @@ void mm_foreach(FAR struct mm_heap_s *heap, mm_node_handler_t handler,
# define region 0
#endif
UNUSED(prev);
DEBUGASSERT(handler);
/* Visit each region */
+1 -1
View File
@@ -65,7 +65,7 @@ static void mallinfo_handler(FAR struct mm_allocnode_s *node, FAR void *arg)
else
{
FAR struct mm_freenode_s *fnode = (FAR void *)node;
UNUSED(fnode);
DEBUGASSERT(nodesize >= MM_MIN_CHUNK);
DEBUGASSERT(fnode->blink->flink == fnode);
DEBUGASSERT(MM_SIZEOF_NODE(fnode->blink) <= nodesize);
+1 -1
View File
@@ -104,7 +104,7 @@ static void memdump_handler(FAR struct mm_allocnode_s *node, FAR void *arg)
else if (dump->pid == PID_MM_FREE)
{
FAR struct mm_freenode_s *fnode = (FAR void *)node;
UNUSED(fnode);
DEBUGASSERT(nodesize >= MM_MIN_CHUNK);
DEBUGASSERT(fnode->blink->flink == fnode);
DEBUGASSERT(MM_SIZEOF_NODE(fnode->blink) <= nodesize);