mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-12-11 22:25:14 -05:00
VeriFast cannot handle casts of side-effectful expressions.
This commit is contained in:
parent
5a7916bff0
commit
80134a65ed
2 changed files with 118 additions and 94 deletions
14
tasks.c
14
tasks.c
|
|
@ -1445,7 +1445,19 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode,
|
|||
#if ( tskSET_NEW_STACKS_TO_KNOWN_VALUE == 1 )
|
||||
{
|
||||
/* Fill the stack with a known value to assist debugging. */
|
||||
( void ) memset( pxNewTCB->pxStack, ( int ) tskSTACK_FILL_BYTE, ( size_t ) ulStackDepth * sizeof( StackType_t ) );
|
||||
#ifdef VERIFAST
|
||||
/* Reason for rewrite:
|
||||
* - VeriFast does not support casts involving side-effectful
|
||||
* expressions.
|
||||
*
|
||||
*
|
||||
* Note: The only affect of void casts is to surpress compiler
|
||||
* warnings.
|
||||
*/
|
||||
memset( pxNewTCB->pxStack, ( int ) tskSTACK_FILL_BYTE, ( size_t ) ulStackDepth * sizeof( StackType_t ) );
|
||||
#else
|
||||
( void ) memset( pxNewTCB->pxStack, ( int ) tskSTACK_FILL_BYTE, ( size_t ) ulStackDepth * sizeof( StackType_t ) );
|
||||
#endif
|
||||
}
|
||||
#endif /* tskSET_NEW_STACKS_TO_KNOWN_VALUE */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue