Skip to content

Commit b5a9229

Browse files
Warning fixes. (#356)
* 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.
1 parent 1d86b97 commit b5a9229

File tree

20 files changed

+6
-61
lines changed

20 files changed

+6
-61
lines changed

portable/ARMv8M/non_secure/portable/GCC/ARM_CM23/portmacro.h

-3
Original file line numberDiff line numberDiff line change
@@ -264,9 +264,6 @@
264264
* @param[in] pxTCB The TCB of the task being deleted.
265265
*/
266266
#define portCLEAN_UP_TCB( pxTCB ) vPortFreeSecureContext( ( uint32_t * ) pxTCB )
267-
#else
268-
#define portALLOCATE_SECURE_CONTEXT( ulSecureStackSize )
269-
#define portCLEAN_UP_TCB( pxTCB )
270267
#endif /* configENABLE_TRUSTZONE */
271268
/*-----------------------------------------------------------*/
272269

portable/ARMv8M/non_secure/portable/GCC/ARM_CM23_NTZ/portmacro.h

-3
Original file line numberDiff line numberDiff line change
@@ -264,9 +264,6 @@
264264
* @param[in] pxTCB The TCB of the task being deleted.
265265
*/
266266
#define portCLEAN_UP_TCB( pxTCB ) vPortFreeSecureContext( ( uint32_t * ) pxTCB )
267-
#else
268-
#define portALLOCATE_SECURE_CONTEXT( ulSecureStackSize )
269-
#define portCLEAN_UP_TCB( pxTCB )
270267
#endif /* configENABLE_TRUSTZONE */
271268
/*-----------------------------------------------------------*/
272269

portable/ARMv8M/non_secure/portable/GCC/ARM_CM33/portmacro.h

-3
Original file line numberDiff line numberDiff line change
@@ -264,9 +264,6 @@
264264
* @param[in] pxTCB The TCB of the task being deleted.
265265
*/
266266
#define portCLEAN_UP_TCB( pxTCB ) vPortFreeSecureContext( ( uint32_t * ) pxTCB )
267-
#else
268-
#define portALLOCATE_SECURE_CONTEXT( ulSecureStackSize )
269-
#define portCLEAN_UP_TCB( pxTCB )
270267
#endif /* configENABLE_TRUSTZONE */
271268
/*-----------------------------------------------------------*/
272269

portable/ARMv8M/non_secure/portable/GCC/ARM_CM33_NTZ/portmacro.h

-3
Original file line numberDiff line numberDiff line change
@@ -264,9 +264,6 @@
264264
* @param[in] pxTCB The TCB of the task being deleted.
265265
*/
266266
#define portCLEAN_UP_TCB( pxTCB ) vPortFreeSecureContext( ( uint32_t * ) pxTCB )
267-
#else
268-
#define portALLOCATE_SECURE_CONTEXT( ulSecureStackSize )
269-
#define portCLEAN_UP_TCB( pxTCB )
270267
#endif /* configENABLE_TRUSTZONE */
271268
/*-----------------------------------------------------------*/
272269

portable/ARMv8M/non_secure/portable/IAR/ARM_CM23/portmacro.h

-3
Original file line numberDiff line numberDiff line change
@@ -264,9 +264,6 @@
264264
* @param[in] pxTCB The TCB of the task being deleted.
265265
*/
266266
#define portCLEAN_UP_TCB( pxTCB ) vPortFreeSecureContext( ( uint32_t * ) pxTCB )
267-
#else
268-
#define portALLOCATE_SECURE_CONTEXT( ulSecureStackSize )
269-
#define portCLEAN_UP_TCB( pxTCB )
270267
#endif /* configENABLE_TRUSTZONE */
271268
/*-----------------------------------------------------------*/
272269

portable/ARMv8M/non_secure/portable/IAR/ARM_CM23_NTZ/portmacro.h

-3
Original file line numberDiff line numberDiff line change
@@ -264,9 +264,6 @@
264264
* @param[in] pxTCB The TCB of the task being deleted.
265265
*/
266266
#define portCLEAN_UP_TCB( pxTCB ) vPortFreeSecureContext( ( uint32_t * ) pxTCB )
267-
#else
268-
#define portALLOCATE_SECURE_CONTEXT( ulSecureStackSize )
269-
#define portCLEAN_UP_TCB( pxTCB )
270267
#endif /* configENABLE_TRUSTZONE */
271268
/*-----------------------------------------------------------*/
272269

portable/ARMv8M/non_secure/portable/IAR/ARM_CM33/portmacro.h

-3
Original file line numberDiff line numberDiff line change
@@ -264,9 +264,6 @@
264264
* @param[in] pxTCB The TCB of the task being deleted.
265265
*/
266266
#define portCLEAN_UP_TCB( pxTCB ) vPortFreeSecureContext( ( uint32_t * ) pxTCB )
267-
#else
268-
#define portALLOCATE_SECURE_CONTEXT( ulSecureStackSize )
269-
#define portCLEAN_UP_TCB( pxTCB )
270267
#endif /* configENABLE_TRUSTZONE */
271268
/*-----------------------------------------------------------*/
272269

portable/ARMv8M/non_secure/portable/IAR/ARM_CM33_NTZ/portmacro.h

-3
Original file line numberDiff line numberDiff line change
@@ -264,9 +264,6 @@
264264
* @param[in] pxTCB The TCB of the task being deleted.
265265
*/
266266
#define portCLEAN_UP_TCB( pxTCB ) vPortFreeSecureContext( ( uint32_t * ) pxTCB )
267-
#else
268-
#define portALLOCATE_SECURE_CONTEXT( ulSecureStackSize )
269-
#define portCLEAN_UP_TCB( pxTCB )
270267
#endif /* configENABLE_TRUSTZONE */
271268
/*-----------------------------------------------------------*/
272269

portable/GCC/ARM_CM23/non_secure/portmacro.h

-3
Original file line numberDiff line numberDiff line change
@@ -264,9 +264,6 @@
264264
* @param[in] pxTCB The TCB of the task being deleted.
265265
*/
266266
#define portCLEAN_UP_TCB( pxTCB ) vPortFreeSecureContext( ( uint32_t * ) pxTCB )
267-
#else
268-
#define portALLOCATE_SECURE_CONTEXT( ulSecureStackSize )
269-
#define portCLEAN_UP_TCB( pxTCB )
270267
#endif /* configENABLE_TRUSTZONE */
271268
/*-----------------------------------------------------------*/
272269

portable/GCC/ARM_CM23_NTZ/non_secure/portmacro.h

-3
Original file line numberDiff line numberDiff line change
@@ -264,9 +264,6 @@
264264
* @param[in] pxTCB The TCB of the task being deleted.
265265
*/
266266
#define portCLEAN_UP_TCB( pxTCB ) vPortFreeSecureContext( ( uint32_t * ) pxTCB )
267-
#else
268-
#define portALLOCATE_SECURE_CONTEXT( ulSecureStackSize )
269-
#define portCLEAN_UP_TCB( pxTCB )
270267
#endif /* configENABLE_TRUSTZONE */
271268
/*-----------------------------------------------------------*/
272269

portable/GCC/ARM_CM33/non_secure/portmacro.h

-3
Original file line numberDiff line numberDiff line change
@@ -264,9 +264,6 @@
264264
* @param[in] pxTCB The TCB of the task being deleted.
265265
*/
266266
#define portCLEAN_UP_TCB( pxTCB ) vPortFreeSecureContext( ( uint32_t * ) pxTCB )
267-
#else
268-
#define portALLOCATE_SECURE_CONTEXT( ulSecureStackSize )
269-
#define portCLEAN_UP_TCB( pxTCB )
270267
#endif /* configENABLE_TRUSTZONE */
271268
/*-----------------------------------------------------------*/
272269

portable/GCC/ARM_CM33_NTZ/non_secure/portmacro.h

-3
Original file line numberDiff line numberDiff line change
@@ -264,9 +264,6 @@
264264
* @param[in] pxTCB The TCB of the task being deleted.
265265
*/
266266
#define portCLEAN_UP_TCB( pxTCB ) vPortFreeSecureContext( ( uint32_t * ) pxTCB )
267-
#else
268-
#define portALLOCATE_SECURE_CONTEXT( ulSecureStackSize )
269-
#define portCLEAN_UP_TCB( pxTCB )
270267
#endif /* configENABLE_TRUSTZONE */
271268
/*-----------------------------------------------------------*/
272269

portable/IAR/ARM_CM23/non_secure/portmacro.h

-3
Original file line numberDiff line numberDiff line change
@@ -264,9 +264,6 @@
264264
* @param[in] pxTCB The TCB of the task being deleted.
265265
*/
266266
#define portCLEAN_UP_TCB( pxTCB ) vPortFreeSecureContext( ( uint32_t * ) pxTCB )
267-
#else
268-
#define portALLOCATE_SECURE_CONTEXT( ulSecureStackSize )
269-
#define portCLEAN_UP_TCB( pxTCB )
270267
#endif /* configENABLE_TRUSTZONE */
271268
/*-----------------------------------------------------------*/
272269

portable/IAR/ARM_CM23_NTZ/non_secure/portmacro.h

-3
Original file line numberDiff line numberDiff line change
@@ -264,9 +264,6 @@
264264
* @param[in] pxTCB The TCB of the task being deleted.
265265
*/
266266
#define portCLEAN_UP_TCB( pxTCB ) vPortFreeSecureContext( ( uint32_t * ) pxTCB )
267-
#else
268-
#define portALLOCATE_SECURE_CONTEXT( ulSecureStackSize )
269-
#define portCLEAN_UP_TCB( pxTCB )
270267
#endif /* configENABLE_TRUSTZONE */
271268
/*-----------------------------------------------------------*/
272269

portable/IAR/ARM_CM33/non_secure/portmacro.h

-3
Original file line numberDiff line numberDiff line change
@@ -264,9 +264,6 @@
264264
* @param[in] pxTCB The TCB of the task being deleted.
265265
*/
266266
#define portCLEAN_UP_TCB( pxTCB ) vPortFreeSecureContext( ( uint32_t * ) pxTCB )
267-
#else
268-
#define portALLOCATE_SECURE_CONTEXT( ulSecureStackSize )
269-
#define portCLEAN_UP_TCB( pxTCB )
270267
#endif /* configENABLE_TRUSTZONE */
271268
/*-----------------------------------------------------------*/
272269

portable/IAR/ARM_CM33_NTZ/non_secure/portmacro.h

-3
Original file line numberDiff line numberDiff line change
@@ -264,9 +264,6 @@
264264
* @param[in] pxTCB The TCB of the task being deleted.
265265
*/
266266
#define portCLEAN_UP_TCB( pxTCB ) vPortFreeSecureContext( ( uint32_t * ) pxTCB )
267-
#else
268-
#define portALLOCATE_SECURE_CONTEXT( ulSecureStackSize )
269-
#define portCLEAN_UP_TCB( pxTCB )
270267
#endif /* configENABLE_TRUSTZONE */
271268
/*-----------------------------------------------------------*/
272269

portable/ThirdParty/GCC/ARC_EM_HS/portmacro.h

-2
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,6 @@ extern volatile unsigned int ulCriticalNesting;
144144
#if defined( __MW__ )
145145
extern void task_end_hook( void * pxTCB );
146146
#define portCLEAN_UP_TCB( pxTCB ) task_end_hook( ( void * ) pxTCB )
147-
#else
148-
#define portCLEAN_UP_TCB( pxTCB ) ( void ) pxTCB
149147
#endif
150148

151149
void vPortYield( void );

portable/ThirdParty/GCC/ARC_v1/portmacro.h

-2
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,6 @@
138138
#define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() do {} while( 0 ) /* we use the timer */
139139
#define portALT_GET_RUN_TIME_COUNTER_VALUE( dest ) ( dest = xTickCount )
140140

141-
#define portCLEAN_UP_TCB( pxTCB ) ( void ) pxTCB
142-
143141
void vPortYield( void );
144142
void vPortYieldFromIsr( void );
145143

portable/ThirdParty/XCC/Xtensa/portmacro.h

-3
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,6 @@ void exit(int);
182182

183183
#if (XT_USE_THREAD_SAFE_CLIB > 0u) && (XSHAL_CLIB == XTHAL_CLIB_XCLIB)
184184
extern void vPortClibInit(void);
185-
186-
// No cleanup necessary at this time.
187-
#define portCLEAN_UP_TCB(pxTCB)
188185
#endif // XCLIB support
189186

190187
#if (XT_USE_THREAD_SAFE_CLIB > 0u) && (XSHAL_CLIB == XTHAL_CLIB_NEWLIB)

timers.c

+6-6
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@
462462
}
463463
else
464464
{
465-
pxTimer->ucStatus &= ~tmrSTATUS_IS_AUTORELOAD;
465+
pxTimer->ucStatus &= ( ( uint8_t ) ~tmrSTATUS_IS_AUTORELOAD );
466466
}
467467
}
468468
taskEXIT_CRITICAL();
@@ -550,7 +550,7 @@
550550
}
551551
else
552552
{
553-
pxTimer->ucStatus &= ~tmrSTATUS_IS_ACTIVE;
553+
pxTimer->ucStatus &= ( ( uint8_t ) ~tmrSTATUS_IS_ACTIVE );
554554
}
555555

556556
/* Call the timer callback. */
@@ -829,7 +829,7 @@
829829
}
830830
else
831831
{
832-
pxTimer->ucStatus &= ~tmrSTATUS_IS_ACTIVE;
832+
pxTimer->ucStatus &= ( ( uint8_t ) ~tmrSTATUS_IS_ACTIVE );
833833
}
834834

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

852852
case tmrCOMMAND_CHANGE_PERIOD:
@@ -876,7 +876,7 @@
876876
}
877877
else
878878
{
879-
pxTimer->ucStatus &= ~tmrSTATUS_IS_ACTIVE;
879+
pxTimer->ucStatus &= ( ( uint8_t ) ~tmrSTATUS_IS_ACTIVE );
880880
}
881881
}
882882
#else /* if ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) */
@@ -885,7 +885,7 @@
885885
* could not have been dynamically allocated. So there is
886886
* no need to free the memory - just mark the timer as
887887
* "not active". */
888-
pxTimer->ucStatus &= ~tmrSTATUS_IS_ACTIVE;
888+
pxTimer->ucStatus &= ( ( uint8_t ) ~tmrSTATUS_IS_ACTIVE );
889889
}
890890
#endif /* configSUPPORT_DYNAMIC_ALLOCATION */
891891
break;

0 commit comments

Comments
 (0)