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 12:59:52 UTC

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

patacongo 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_r379830130
 
 

 ##########
 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:
   This assertion can't be right.  If line 110 is removed, then fnode has no value.

----------------------------------------------------------------
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