You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2020/02/15 13:41:23 UTC

[GitHub] [incubator-nuttx] Ouss4 commented on a change in pull request #284: mm/mm_heap: Fix warnings included by #266

Ouss4 commented on a change in pull request #284: mm/mm_heap: Fix warnings included by #266
URL: https://github.com/apache/incubator-nuttx/pull/284#discussion_r379832135
 
 

 ##########
 File path: mm/mm_heap/mm_mallinfo.c
 ##########
 @@ -105,9 +106,10 @@ int mm_mallinfo(FAR struct mm_heap_s *heap, FAR struct mallinfo *info)
             }
           else
             {
-              FAR struct mm_freenode_s *fnode;
+#ifdef CONFIG_DEBUG_ASSERTIONS
+              FAR struct mm_freenode_s *fnode = (FAR void *)node;
+#endif
               DEBUGASSERT(node->size >= SIZEOF_MM_FREENODE);
-              fnode = (FAR void *)node;
               DEBUGASSERT(fnode->blink->flink == fnode);
 
 Review comment:
   You mean it won't have a value for DEBUGASSERT?
   But DEBBUGASSERT is only active when assertions are enabled.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services