diff --git a/portable/ARMv8M/secure/heap/secure_heap.c b/portable/ARMv8M/secure/heap/secure_heap.c index 4fa6a2ffa..a60679eb1 100644 --- a/portable/ARMv8M/secure/heap/secure_heap.c +++ b/portable/ARMv8M/secure/heap/secure_heap.c @@ -360,7 +360,7 @@ void * pvPortMalloc( size_t xWantedSize ) } else { - mtCOVERAGE_TEST_MARKER(); + xWantedSize = pxBlock->xBlockSize; } xFreeBytesRemaining -= pxBlock->xBlockSize; @@ -396,6 +396,9 @@ void * pvPortMalloc( size_t xWantedSize ) traceMALLOC( pvReturn, xWantedSize ); + /* Prevent compiler warnings when trace macros are not used. */ + ( void ) xWantedSize; + #if ( secureconfigUSE_MALLOC_FAILED_HOOK == 1 ) { if( pvReturn == NULL ) diff --git a/portable/GCC/ARM_CM23/secure/secure_heap.c b/portable/GCC/ARM_CM23/secure/secure_heap.c index 4fa6a2ffa..a60679eb1 100644 --- a/portable/GCC/ARM_CM23/secure/secure_heap.c +++ b/portable/GCC/ARM_CM23/secure/secure_heap.c @@ -360,7 +360,7 @@ void * pvPortMalloc( size_t xWantedSize ) } else { - mtCOVERAGE_TEST_MARKER(); + xWantedSize = pxBlock->xBlockSize; } xFreeBytesRemaining -= pxBlock->xBlockSize; @@ -396,6 +396,9 @@ void * pvPortMalloc( size_t xWantedSize ) traceMALLOC( pvReturn, xWantedSize ); + /* Prevent compiler warnings when trace macros are not used. */ + ( void ) xWantedSize; + #if ( secureconfigUSE_MALLOC_FAILED_HOOK == 1 ) { if( pvReturn == NULL ) diff --git a/portable/GCC/ARM_CM33/secure/secure_heap.c b/portable/GCC/ARM_CM33/secure/secure_heap.c index 4fa6a2ffa..a60679eb1 100644 --- a/portable/GCC/ARM_CM33/secure/secure_heap.c +++ b/portable/GCC/ARM_CM33/secure/secure_heap.c @@ -360,7 +360,7 @@ void * pvPortMalloc( size_t xWantedSize ) } else { - mtCOVERAGE_TEST_MARKER(); + xWantedSize = pxBlock->xBlockSize; } xFreeBytesRemaining -= pxBlock->xBlockSize; @@ -396,6 +396,9 @@ void * pvPortMalloc( size_t xWantedSize ) traceMALLOC( pvReturn, xWantedSize ); + /* Prevent compiler warnings when trace macros are not used. */ + ( void ) xWantedSize; + #if ( secureconfigUSE_MALLOC_FAILED_HOOK == 1 ) { if( pvReturn == NULL ) diff --git a/portable/GCC/ARM_CM35P/secure/secure_heap.c b/portable/GCC/ARM_CM35P/secure/secure_heap.c index 4fa6a2ffa..a60679eb1 100644 --- a/portable/GCC/ARM_CM35P/secure/secure_heap.c +++ b/portable/GCC/ARM_CM35P/secure/secure_heap.c @@ -360,7 +360,7 @@ void * pvPortMalloc( size_t xWantedSize ) } else { - mtCOVERAGE_TEST_MARKER(); + xWantedSize = pxBlock->xBlockSize; } xFreeBytesRemaining -= pxBlock->xBlockSize; @@ -396,6 +396,9 @@ void * pvPortMalloc( size_t xWantedSize ) traceMALLOC( pvReturn, xWantedSize ); + /* Prevent compiler warnings when trace macros are not used. */ + ( void ) xWantedSize; + #if ( secureconfigUSE_MALLOC_FAILED_HOOK == 1 ) { if( pvReturn == NULL ) diff --git a/portable/GCC/ARM_CM55/secure/secure_heap.c b/portable/GCC/ARM_CM55/secure/secure_heap.c index 4fa6a2ffa..a60679eb1 100644 --- a/portable/GCC/ARM_CM55/secure/secure_heap.c +++ b/portable/GCC/ARM_CM55/secure/secure_heap.c @@ -360,7 +360,7 @@ void * pvPortMalloc( size_t xWantedSize ) } else { - mtCOVERAGE_TEST_MARKER(); + xWantedSize = pxBlock->xBlockSize; } xFreeBytesRemaining -= pxBlock->xBlockSize; @@ -396,6 +396,9 @@ void * pvPortMalloc( size_t xWantedSize ) traceMALLOC( pvReturn, xWantedSize ); + /* Prevent compiler warnings when trace macros are not used. */ + ( void ) xWantedSize; + #if ( secureconfigUSE_MALLOC_FAILED_HOOK == 1 ) { if( pvReturn == NULL ) diff --git a/portable/GCC/ARM_CM85/secure/secure_heap.c b/portable/GCC/ARM_CM85/secure/secure_heap.c index 4fa6a2ffa..a60679eb1 100644 --- a/portable/GCC/ARM_CM85/secure/secure_heap.c +++ b/portable/GCC/ARM_CM85/secure/secure_heap.c @@ -360,7 +360,7 @@ void * pvPortMalloc( size_t xWantedSize ) } else { - mtCOVERAGE_TEST_MARKER(); + xWantedSize = pxBlock->xBlockSize; } xFreeBytesRemaining -= pxBlock->xBlockSize; @@ -396,6 +396,9 @@ void * pvPortMalloc( size_t xWantedSize ) traceMALLOC( pvReturn, xWantedSize ); + /* Prevent compiler warnings when trace macros are not used. */ + ( void ) xWantedSize; + #if ( secureconfigUSE_MALLOC_FAILED_HOOK == 1 ) { if( pvReturn == NULL ) diff --git a/portable/IAR/ARM_CM23/secure/secure_heap.c b/portable/IAR/ARM_CM23/secure/secure_heap.c index 4fa6a2ffa..a60679eb1 100644 --- a/portable/IAR/ARM_CM23/secure/secure_heap.c +++ b/portable/IAR/ARM_CM23/secure/secure_heap.c @@ -360,7 +360,7 @@ void * pvPortMalloc( size_t xWantedSize ) } else { - mtCOVERAGE_TEST_MARKER(); + xWantedSize = pxBlock->xBlockSize; } xFreeBytesRemaining -= pxBlock->xBlockSize; @@ -396,6 +396,9 @@ void * pvPortMalloc( size_t xWantedSize ) traceMALLOC( pvReturn, xWantedSize ); + /* Prevent compiler warnings when trace macros are not used. */ + ( void ) xWantedSize; + #if ( secureconfigUSE_MALLOC_FAILED_HOOK == 1 ) { if( pvReturn == NULL ) diff --git a/portable/IAR/ARM_CM33/secure/secure_heap.c b/portable/IAR/ARM_CM33/secure/secure_heap.c index 4fa6a2ffa..a60679eb1 100644 --- a/portable/IAR/ARM_CM33/secure/secure_heap.c +++ b/portable/IAR/ARM_CM33/secure/secure_heap.c @@ -360,7 +360,7 @@ void * pvPortMalloc( size_t xWantedSize ) } else { - mtCOVERAGE_TEST_MARKER(); + xWantedSize = pxBlock->xBlockSize; } xFreeBytesRemaining -= pxBlock->xBlockSize; @@ -396,6 +396,9 @@ void * pvPortMalloc( size_t xWantedSize ) traceMALLOC( pvReturn, xWantedSize ); + /* Prevent compiler warnings when trace macros are not used. */ + ( void ) xWantedSize; + #if ( secureconfigUSE_MALLOC_FAILED_HOOK == 1 ) { if( pvReturn == NULL ) diff --git a/portable/IAR/ARM_CM35P/secure/secure_heap.c b/portable/IAR/ARM_CM35P/secure/secure_heap.c index 4fa6a2ffa..a60679eb1 100644 --- a/portable/IAR/ARM_CM35P/secure/secure_heap.c +++ b/portable/IAR/ARM_CM35P/secure/secure_heap.c @@ -360,7 +360,7 @@ void * pvPortMalloc( size_t xWantedSize ) } else { - mtCOVERAGE_TEST_MARKER(); + xWantedSize = pxBlock->xBlockSize; } xFreeBytesRemaining -= pxBlock->xBlockSize; @@ -396,6 +396,9 @@ void * pvPortMalloc( size_t xWantedSize ) traceMALLOC( pvReturn, xWantedSize ); + /* Prevent compiler warnings when trace macros are not used. */ + ( void ) xWantedSize; + #if ( secureconfigUSE_MALLOC_FAILED_HOOK == 1 ) { if( pvReturn == NULL ) diff --git a/portable/IAR/ARM_CM55/secure/secure_heap.c b/portable/IAR/ARM_CM55/secure/secure_heap.c index 4fa6a2ffa..a60679eb1 100644 --- a/portable/IAR/ARM_CM55/secure/secure_heap.c +++ b/portable/IAR/ARM_CM55/secure/secure_heap.c @@ -360,7 +360,7 @@ void * pvPortMalloc( size_t xWantedSize ) } else { - mtCOVERAGE_TEST_MARKER(); + xWantedSize = pxBlock->xBlockSize; } xFreeBytesRemaining -= pxBlock->xBlockSize; @@ -396,6 +396,9 @@ void * pvPortMalloc( size_t xWantedSize ) traceMALLOC( pvReturn, xWantedSize ); + /* Prevent compiler warnings when trace macros are not used. */ + ( void ) xWantedSize; + #if ( secureconfigUSE_MALLOC_FAILED_HOOK == 1 ) { if( pvReturn == NULL ) diff --git a/portable/IAR/ARM_CM85/secure/secure_heap.c b/portable/IAR/ARM_CM85/secure/secure_heap.c index 4fa6a2ffa..a60679eb1 100644 --- a/portable/IAR/ARM_CM85/secure/secure_heap.c +++ b/portable/IAR/ARM_CM85/secure/secure_heap.c @@ -360,7 +360,7 @@ void * pvPortMalloc( size_t xWantedSize ) } else { - mtCOVERAGE_TEST_MARKER(); + xWantedSize = pxBlock->xBlockSize; } xFreeBytesRemaining -= pxBlock->xBlockSize; @@ -396,6 +396,9 @@ void * pvPortMalloc( size_t xWantedSize ) traceMALLOC( pvReturn, xWantedSize ); + /* Prevent compiler warnings when trace macros are not used. */ + ( void ) xWantedSize; + #if ( secureconfigUSE_MALLOC_FAILED_HOOK == 1 ) { if( pvReturn == NULL ) diff --git a/portable/MemMang/heap_2.c b/portable/MemMang/heap_2.c index c1b35b911..f662614e5 100644 --- a/portable/MemMang/heap_2.c +++ b/portable/MemMang/heap_2.c @@ -258,6 +258,10 @@ void * pvPortMalloc( size_t xWantedSize ) * iterate to find the right place to insert new block. */ prvInsertBlockIntoFreeList( ( pxNewBlockLink ) ); } + else + { + xWantedSize = pxBlock->xBlockSize; + } xFreeBytesRemaining -= pxBlock->xBlockSize; @@ -270,6 +274,9 @@ void * pvPortMalloc( size_t xWantedSize ) } traceMALLOC( pvReturn, xWantedSize ); + + /* Prevent compiler warnings when trace macros are not used. */ + ( void ) xWantedSize; } ( void ) xTaskResumeAll(); diff --git a/portable/MemMang/heap_4.c b/portable/MemMang/heap_4.c index 71b6a9421..c1ce3c1ab 100644 --- a/portable/MemMang/heap_4.c +++ b/portable/MemMang/heap_4.c @@ -288,7 +288,7 @@ void * pvPortMalloc( size_t xWantedSize ) } else { - mtCOVERAGE_TEST_MARKER(); + xWantedSize = pxBlock->xBlockSize; } xFreeBytesRemaining -= pxBlock->xBlockSize; @@ -324,6 +324,9 @@ void * pvPortMalloc( size_t xWantedSize ) } traceMALLOC( pvReturn, xWantedSize ); + + /* Prevent compiler warnings when trace macros are not used. */ + ( void ) xWantedSize; } ( void ) xTaskResumeAll(); diff --git a/portable/MemMang/heap_5.c b/portable/MemMang/heap_5.c index bb33bcfad..0bc44ebd9 100644 --- a/portable/MemMang/heap_5.c +++ b/portable/MemMang/heap_5.c @@ -316,7 +316,7 @@ void * pvPortMalloc( size_t xWantedSize ) } else { - mtCOVERAGE_TEST_MARKER(); + xWantedSize = pxBlock->xBlockSize; } xFreeBytesRemaining -= pxBlock->xBlockSize; @@ -352,6 +352,9 @@ void * pvPortMalloc( size_t xWantedSize ) } traceMALLOC( pvReturn, xWantedSize ); + + /* Prevent compiler warnings when trace macros are not used. */ + ( void ) xWantedSize; } ( void ) xTaskResumeAll();