mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-12-11 22:25:14 -05:00
Added automatic deletion of void casts (used to suppress warnings) and linked to filed VeriFast issue 335.
This commit is contained in:
parent
1e2acf6139
commit
a470fec6d0
2 changed files with 7 additions and 7 deletions
9
tasks.c
9
tasks.c
|
|
@ -1496,17 +1496,12 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode,
|
||||||
/* Fill the stack with a known value to assist debugging. */
|
/* Fill the stack with a known value to assist debugging. */
|
||||||
#ifdef VERIFAST
|
#ifdef VERIFAST
|
||||||
/* Reason for rewrite:
|
/* Reason for rewrite:
|
||||||
* - VeriFast does not support casts involving side-effectful
|
* - VeriFast reports type mismatch because
|
||||||
* expressions.
|
|
||||||
* - VeriFast report type mismatch because
|
|
||||||
* `( int ) tskSTACK_FILL_BYTE` is passed for a char argument.
|
* `( int ) tskSTACK_FILL_BYTE` is passed for a char argument.
|
||||||
*
|
*
|
||||||
* Note: The only affect of void casts is to surpress compiler
|
|
||||||
* warnings.
|
|
||||||
*
|
|
||||||
* TODO: Is the type mismatch a real error?
|
* TODO: Is the type mismatch a real error?
|
||||||
*/
|
*/
|
||||||
memset( pxNewTCB->pxStack, ( char ) tskSTACK_FILL_BYTE, ( size_t ) ulStackDepth * sizeof( StackType_t ) );
|
( void ) memset( pxNewTCB->pxStack, ( char ) tskSTACK_FILL_BYTE, ( size_t ) ulStackDepth * sizeof( StackType_t ) );
|
||||||
#else
|
#else
|
||||||
( void ) memset( pxNewTCB->pxStack, ( int ) tskSTACK_FILL_BYTE, ( size_t ) ulStackDepth * sizeof( StackType_t ) );
|
( void ) memset( pxNewTCB->pxStack, ( int ) tskSTACK_FILL_BYTE, ( size_t ) ulStackDepth * sizeof( StackType_t ) );
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,11 @@ rewrite "__attribute__(([_a-z]*))" ""
|
||||||
# TODO: Why does matching `\s` or `:space:` not work on MacOs?
|
# TODO: Why does matching `\s` or `:space:` not work on MacOs?
|
||||||
rewrite "__attribute__( ( [_a-z]* ) )" ""
|
rewrite "__attribute__( ( [_a-z]* ) )" ""
|
||||||
|
|
||||||
|
echo "Delete void casts (used to suppress compiler warnings)"
|
||||||
|
echo "Reported issue 335"
|
||||||
|
echo "https://github.com/verifast/verifast/issues/335"
|
||||||
|
rewrite "( void ) memset" "memset"
|
||||||
|
|
||||||
echo "Removing const qualifiers from pointers"
|
echo "Removing const qualifiers from pointers"
|
||||||
echo "Reported issue 333:"
|
echo "Reported issue 333:"
|
||||||
echo "https://github.com/verifast/verifast/issues/333"
|
echo "https://github.com/verifast/verifast/issues/333"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue