Skip to content

Commit

Permalink
Warning fixes. (FreeRTOS#356)
Browse files Browse the repository at this point in the history
* Use cast to fix warnings.

* Remove all empty definitions of portCLEAN_UP_TCB( pxTCB ) and
  portALLOCATE_SECURE_CONTEXT( ulSecureStackSize ) from ports.
  When these are undefined, the default empty definition is defined
  in FreeRTOS.h.
  • Loading branch information
kjassmann-renesas authored Jul 20, 2021
1 parent 1d86b97 commit b5a9229
Show file tree
Hide file tree
Showing 20 changed files with 6 additions and 61 deletions.
3 changes: 0 additions & 3 deletions portable/ARMv8M/non_secure/portable/GCC/ARM_CM23/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,6 @@
* @param[in] pxTCB The TCB of the task being deleted.
*/
#define portCLEAN_UP_TCB( pxTCB ) vPortFreeSecureContext( ( uint32_t * ) pxTCB )
#else
#define portALLOCATE_SECURE_CONTEXT( ulSecureStackSize )
#define portCLEAN_UP_TCB( pxTCB )
#endif /* configENABLE_TRUSTZONE */
/*-----------------------------------------------------------*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,6 @@
* @param[in] pxTCB The TCB of the task being deleted.
*/
#define portCLEAN_UP_TCB( pxTCB ) vPortFreeSecureContext( ( uint32_t * ) pxTCB )
#else
#define portALLOCATE_SECURE_CONTEXT( ulSecureStackSize )
#define portCLEAN_UP_TCB( pxTCB )
#endif /* configENABLE_TRUSTZONE */
/*-----------------------------------------------------------*/

Expand Down
3 changes: 0 additions & 3 deletions portable/ARMv8M/non_secure/portable/GCC/ARM_CM33/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,6 @@
* @param[in] pxTCB The TCB of the task being deleted.
*/
#define portCLEAN_UP_TCB( pxTCB ) vPortFreeSecureContext( ( uint32_t * ) pxTCB )
#else
#define portALLOCATE_SECURE_CONTEXT( ulSecureStackSize )
#define portCLEAN_UP_TCB( pxTCB )
#endif /* configENABLE_TRUSTZONE */
/*-----------------------------------------------------------*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,6 @@
* @param[in] pxTCB The TCB of the task being deleted.
*/
#define portCLEAN_UP_TCB( pxTCB ) vPortFreeSecureContext( ( uint32_t * ) pxTCB )
#else
#define portALLOCATE_SECURE_CONTEXT( ulSecureStackSize )
#define portCLEAN_UP_TCB( pxTCB )
#endif /* configENABLE_TRUSTZONE */
/*-----------------------------------------------------------*/

Expand Down
3 changes: 0 additions & 3 deletions portable/ARMv8M/non_secure/portable/IAR/ARM_CM23/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,6 @@
* @param[in] pxTCB The TCB of the task being deleted.
*/
#define portCLEAN_UP_TCB( pxTCB ) vPortFreeSecureContext( ( uint32_t * ) pxTCB )
#else
#define portALLOCATE_SECURE_CONTEXT( ulSecureStackSize )
#define portCLEAN_UP_TCB( pxTCB )
#endif /* configENABLE_TRUSTZONE */
/*-----------------------------------------------------------*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,6 @@
* @param[in] pxTCB The TCB of the task being deleted.
*/
#define portCLEAN_UP_TCB( pxTCB ) vPortFreeSecureContext( ( uint32_t * ) pxTCB )
#else
#define portALLOCATE_SECURE_CONTEXT( ulSecureStackSize )
#define portCLEAN_UP_TCB( pxTCB )
#endif /* configENABLE_TRUSTZONE */
/*-----------------------------------------------------------*/

Expand Down
3 changes: 0 additions & 3 deletions portable/ARMv8M/non_secure/portable/IAR/ARM_CM33/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,6 @@
* @param[in] pxTCB The TCB of the task being deleted.
*/
#define portCLEAN_UP_TCB( pxTCB ) vPortFreeSecureContext( ( uint32_t * ) pxTCB )
#else
#define portALLOCATE_SECURE_CONTEXT( ulSecureStackSize )
#define portCLEAN_UP_TCB( pxTCB )
#endif /* configENABLE_TRUSTZONE */
/*-----------------------------------------------------------*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,6 @@
* @param[in] pxTCB The TCB of the task being deleted.
*/
#define portCLEAN_UP_TCB( pxTCB ) vPortFreeSecureContext( ( uint32_t * ) pxTCB )
#else
#define portALLOCATE_SECURE_CONTEXT( ulSecureStackSize )
#define portCLEAN_UP_TCB( pxTCB )
#endif /* configENABLE_TRUSTZONE */
/*-----------------------------------------------------------*/

Expand Down
3 changes: 0 additions & 3 deletions portable/GCC/ARM_CM23/non_secure/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,6 @@
* @param[in] pxTCB The TCB of the task being deleted.
*/
#define portCLEAN_UP_TCB( pxTCB ) vPortFreeSecureContext( ( uint32_t * ) pxTCB )
#else
#define portALLOCATE_SECURE_CONTEXT( ulSecureStackSize )
#define portCLEAN_UP_TCB( pxTCB )
#endif /* configENABLE_TRUSTZONE */
/*-----------------------------------------------------------*/

Expand Down
3 changes: 0 additions & 3 deletions portable/GCC/ARM_CM23_NTZ/non_secure/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,6 @@
* @param[in] pxTCB The TCB of the task being deleted.
*/
#define portCLEAN_UP_TCB( pxTCB ) vPortFreeSecureContext( ( uint32_t * ) pxTCB )
#else
#define portALLOCATE_SECURE_CONTEXT( ulSecureStackSize )
#define portCLEAN_UP_TCB( pxTCB )
#endif /* configENABLE_TRUSTZONE */
/*-----------------------------------------------------------*/

Expand Down
3 changes: 0 additions & 3 deletions portable/GCC/ARM_CM33/non_secure/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,6 @@
* @param[in] pxTCB The TCB of the task being deleted.
*/
#define portCLEAN_UP_TCB( pxTCB ) vPortFreeSecureContext( ( uint32_t * ) pxTCB )
#else
#define portALLOCATE_SECURE_CONTEXT( ulSecureStackSize )
#define portCLEAN_UP_TCB( pxTCB )
#endif /* configENABLE_TRUSTZONE */
/*-----------------------------------------------------------*/

Expand Down
3 changes: 0 additions & 3 deletions portable/GCC/ARM_CM33_NTZ/non_secure/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,6 @@
* @param[in] pxTCB The TCB of the task being deleted.
*/
#define portCLEAN_UP_TCB( pxTCB ) vPortFreeSecureContext( ( uint32_t * ) pxTCB )
#else
#define portALLOCATE_SECURE_CONTEXT( ulSecureStackSize )
#define portCLEAN_UP_TCB( pxTCB )
#endif /* configENABLE_TRUSTZONE */
/*-----------------------------------------------------------*/

Expand Down
3 changes: 0 additions & 3 deletions portable/IAR/ARM_CM23/non_secure/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,6 @@
* @param[in] pxTCB The TCB of the task being deleted.
*/
#define portCLEAN_UP_TCB( pxTCB ) vPortFreeSecureContext( ( uint32_t * ) pxTCB )
#else
#define portALLOCATE_SECURE_CONTEXT( ulSecureStackSize )
#define portCLEAN_UP_TCB( pxTCB )
#endif /* configENABLE_TRUSTZONE */
/*-----------------------------------------------------------*/

Expand Down
3 changes: 0 additions & 3 deletions portable/IAR/ARM_CM23_NTZ/non_secure/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,6 @@
* @param[in] pxTCB The TCB of the task being deleted.
*/
#define portCLEAN_UP_TCB( pxTCB ) vPortFreeSecureContext( ( uint32_t * ) pxTCB )
#else
#define portALLOCATE_SECURE_CONTEXT( ulSecureStackSize )
#define portCLEAN_UP_TCB( pxTCB )
#endif /* configENABLE_TRUSTZONE */
/*-----------------------------------------------------------*/

Expand Down
3 changes: 0 additions & 3 deletions portable/IAR/ARM_CM33/non_secure/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,6 @@
* @param[in] pxTCB The TCB of the task being deleted.
*/
#define portCLEAN_UP_TCB( pxTCB ) vPortFreeSecureContext( ( uint32_t * ) pxTCB )
#else
#define portALLOCATE_SECURE_CONTEXT( ulSecureStackSize )
#define portCLEAN_UP_TCB( pxTCB )
#endif /* configENABLE_TRUSTZONE */
/*-----------------------------------------------------------*/

Expand Down
3 changes: 0 additions & 3 deletions portable/IAR/ARM_CM33_NTZ/non_secure/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,6 @@
* @param[in] pxTCB The TCB of the task being deleted.
*/
#define portCLEAN_UP_TCB( pxTCB ) vPortFreeSecureContext( ( uint32_t * ) pxTCB )
#else
#define portALLOCATE_SECURE_CONTEXT( ulSecureStackSize )
#define portCLEAN_UP_TCB( pxTCB )
#endif /* configENABLE_TRUSTZONE */
/*-----------------------------------------------------------*/

Expand Down
2 changes: 0 additions & 2 deletions portable/ThirdParty/GCC/ARC_EM_HS/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,6 @@ extern volatile unsigned int ulCriticalNesting;
#if defined( __MW__ )
extern void task_end_hook( void * pxTCB );
#define portCLEAN_UP_TCB( pxTCB ) task_end_hook( ( void * ) pxTCB )
#else
#define portCLEAN_UP_TCB( pxTCB ) ( void ) pxTCB
#endif

void vPortYield( void );
Expand Down
2 changes: 0 additions & 2 deletions portable/ThirdParty/GCC/ARC_v1/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,6 @@
#define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() do {} while( 0 ) /* we use the timer */
#define portALT_GET_RUN_TIME_COUNTER_VALUE( dest ) ( dest = xTickCount )

#define portCLEAN_UP_TCB( pxTCB ) ( void ) pxTCB

void vPortYield( void );
void vPortYieldFromIsr( void );

Expand Down
3 changes: 0 additions & 3 deletions portable/ThirdParty/XCC/Xtensa/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,6 @@ void exit(int);

#if (XT_USE_THREAD_SAFE_CLIB > 0u) && (XSHAL_CLIB == XTHAL_CLIB_XCLIB)
extern void vPortClibInit(void);

// No cleanup necessary at this time.
#define portCLEAN_UP_TCB(pxTCB)
#endif // XCLIB support

#if (XT_USE_THREAD_SAFE_CLIB > 0u) && (XSHAL_CLIB == XTHAL_CLIB_NEWLIB)
Expand Down
12 changes: 6 additions & 6 deletions timers.c
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@
}
else
{
pxTimer->ucStatus &= ~tmrSTATUS_IS_AUTORELOAD;
pxTimer->ucStatus &= ( ( uint8_t ) ~tmrSTATUS_IS_AUTORELOAD );
}
}
taskEXIT_CRITICAL();
Expand Down Expand Up @@ -550,7 +550,7 @@
}
else
{
pxTimer->ucStatus &= ~tmrSTATUS_IS_ACTIVE;
pxTimer->ucStatus &= ( ( uint8_t ) ~tmrSTATUS_IS_ACTIVE );
}

/* Call the timer callback. */
Expand Down Expand Up @@ -829,7 +829,7 @@
}
else
{
pxTimer->ucStatus &= ~tmrSTATUS_IS_ACTIVE;
pxTimer->ucStatus &= ( ( uint8_t ) ~tmrSTATUS_IS_ACTIVE );
}

/* Call the timer callback. */
Expand All @@ -846,7 +846,7 @@
case tmrCOMMAND_STOP:
case tmrCOMMAND_STOP_FROM_ISR:
/* The timer has already been removed from the active list. */
pxTimer->ucStatus &= ~tmrSTATUS_IS_ACTIVE;
pxTimer->ucStatus &= ( ( uint8_t ) ~tmrSTATUS_IS_ACTIVE );
break;

case tmrCOMMAND_CHANGE_PERIOD:
Expand Down Expand Up @@ -876,7 +876,7 @@
}
else
{
pxTimer->ucStatus &= ~tmrSTATUS_IS_ACTIVE;
pxTimer->ucStatus &= ( ( uint8_t ) ~tmrSTATUS_IS_ACTIVE );
}
}
#else /* if ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) */
Expand All @@ -885,7 +885,7 @@
* could not have been dynamically allocated. So there is
* no need to free the memory - just mark the timer as
* "not active". */
pxTimer->ucStatus &= ~tmrSTATUS_IS_ACTIVE;
pxTimer->ucStatus &= ( ( uint8_t ) ~tmrSTATUS_IS_ACTIVE );
}
#endif /* configSUPPORT_DYNAMIC_ALLOCATION */
break;
Expand Down

0 comments on commit b5a9229

Please sign in to comment.