diff --git a/portable/MemMang/heap_5.c b/portable/MemMang/heap_5.c index bf321304f..d86a6e9a5 100644 --- a/portable/MemMang/heap_5.c +++ b/portable/MemMang/heap_5.c @@ -489,7 +489,8 @@ static void prvInsertBlockIntoFreeList( BlockLink_t * pxBlockToInsert ) /* PRIVI /* Iterate through the list until a block is found that has a higher address * than the block being inserted. */ - for( pxIterator = &xStart; heapPROTECT_BLOCK_POINTER( pxIterator->pxNextFreeBlock ) < pxBlockToInsert; pxIterator = heapPROTECT_BLOCK_POINTER( pxIterator->pxNextFreeBlock ) ) + for( pxIterator = &xStart; ( portPOINTER_SIZE_TYPE ) heapPROTECT_BLOCK_POINTER( pxIterator->pxNextFreeBlock ) < ( portPOINTER_SIZE_TYPE ) pxBlockToInsert; + pxIterator = heapPROTECT_BLOCK_POINTER( pxIterator->pxNextFreeBlock ) ) { /* Nothing to do here, just iterate to the right position. */ }