From: rtel Date: Thu, 21 Nov 2019 22:35:21 +0000 (+0000) Subject: Remove guards against __ARMCC_VERSION version numbers that were previously used to... X-Git-Tag: V10.3.0~67 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=4bec60aa83715caa454111c71937565b41e31c8a;p=freertos Remove guards against __ARMCC_VERSION version numbers that were previously used to avoid compiler warnings in some GCC ARM Cortex ports. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@2756 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- diff --git a/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/GCC/ARM_CM23/portasm.c b/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/GCC/ARM_CM23/portasm.c index e4fbe2d68..e57ce9db1 100644 --- a/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/GCC/ARM_CM23/portasm.c +++ b/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/GCC/ARM_CM23/portasm.c @@ -210,13 +210,6 @@ uint32_t ulSetInterruptMaskFromISR( void ) /* __attribute__(( naked )) PRIVILEGE " bx lr \n" ::: "memory" ); - -#if !defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) - /* To avoid compiler warnings. The return statement will never be reached, - * but some compilers warn if it is not included, while others won't compile - * if it is. */ - return 0; -#endif } /*-----------------------------------------------------------*/ @@ -228,14 +221,6 @@ void vClearInterruptMaskFromISR( __attribute__( ( unused ) ) uint32_t ulMask ) / " bx lr \n" ::: "memory" ); - -#if !defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) - /* Just to avoid compiler warning. ulMask is used from the asm code but - * the compiler can't see that. Some compilers generate warnings without - * the following line, while others generate warnings if the line is - * included. */ - ( void ) ulMask; -#endif } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/GCC/ARM_CM23_NTZ/portasm.c b/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/GCC/ARM_CM23_NTZ/portasm.c index 3ce52c3d1..95ad2f2fc 100644 --- a/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/GCC/ARM_CM23_NTZ/portasm.c +++ b/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/GCC/ARM_CM23_NTZ/portasm.c @@ -205,13 +205,6 @@ uint32_t ulSetInterruptMaskFromISR( void ) /* __attribute__(( naked )) PRIVILEGE " bx lr \n" ::: "memory" ); - -#if !defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) - /* To avoid compiler warnings. The return statement will never be reached, - * but some compilers warn if it is not included, while others won't compile - * if it is. */ - return 0; -#endif } /*-----------------------------------------------------------*/ @@ -223,14 +216,6 @@ void vClearInterruptMaskFromISR( __attribute__( ( unused ) ) uint32_t ulMask ) / " bx lr \n" ::: "memory" ); - -#if !defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) - /* Just to avoid compiler warning. ulMask is used from the asm code but - * the compiler can't see that. Some compilers generate warnings without - * the following line, while others generate warnings if the line is - * included. */ - ( void ) ulMask; -#endif } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/GCC/ARM_CM33/portasm.c b/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/GCC/ARM_CM33/portasm.c index f4be178c1..dfec22dee 100644 --- a/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/GCC/ARM_CM33/portasm.c +++ b/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/GCC/ARM_CM33/portasm.c @@ -185,13 +185,6 @@ uint32_t ulSetInterruptMaskFromISR( void ) /* __attribute__(( naked )) PRIVILEGE " bx lr \n" ::: "memory" ); - -#if !defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) - /* To avoid compiler warnings. The return statement will never be reached, - * but some compilers warn if it is not included, while others won't compile - * if it is. */ - return 0; -#endif } /*-----------------------------------------------------------*/ @@ -203,14 +196,6 @@ void vClearInterruptMaskFromISR( __attribute__( ( unused ) ) uint32_t ulMask ) / " bx lr \n" ::: "memory" ); - -#if !defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) - /* Just to avoid compiler warning. ulMask is used from the asm code but - * the compiler can't see that. Some compilers generate warnings without - * the following line, while others generate warnings if the line is - * included. */ - ( void ) ulMask; -#endif } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/GCC/ARM_CM33_NTZ/portasm.c b/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/GCC/ARM_CM33_NTZ/portasm.c index 2f87d0f6d..b6f1bbcef 100644 --- a/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/GCC/ARM_CM33_NTZ/portasm.c +++ b/FreeRTOS/Source/portable/ARMv8M/non_secure/portable/GCC/ARM_CM33_NTZ/portasm.c @@ -180,13 +180,6 @@ uint32_t ulSetInterruptMaskFromISR( void ) /* __attribute__(( naked )) PRIVILEGE " bx lr \n" ::: "memory" ); - -#if !defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) - /* To avoid compiler warnings. The return statement will never be reached, - * but some compilers warn if it is not included, while others won't compile - * if it is. */ - return 0; -#endif } /*-----------------------------------------------------------*/ @@ -198,14 +191,6 @@ void vClearInterruptMaskFromISR( __attribute__( ( unused ) ) uint32_t ulMask ) / " bx lr \n" ::: "memory" ); - -#if !defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) - /* Just to avoid compiler warning. ulMask is used from the asm code but - * the compiler can't see that. Some compilers generate warnings without - * the following line, while others generate warnings if the line is - * included. */ - ( void ) ulMask; -#endif } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM0/port.c b/FreeRTOS/Source/portable/GCC/ARM_CM0/port.c index 78601f688..d0b50c392 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM0/port.c +++ b/FreeRTOS/Source/portable/GCC/ARM_CM0/port.c @@ -225,8 +225,8 @@ void vPortYield( void ) void vPortEnterCritical( void ) { - portDISABLE_INTERRUPTS(); - uxCriticalNesting++; + portDISABLE_INTERRUPTS(); + uxCriticalNesting++; __asm volatile( "dsb" ::: "memory" ); __asm volatile( "isb" ); } @@ -235,11 +235,11 @@ void vPortEnterCritical( void ) void vPortExitCritical( void ) { configASSERT( uxCriticalNesting ); - uxCriticalNesting--; - if( uxCriticalNesting == 0 ) - { - portENABLE_INTERRUPTS(); - } + uxCriticalNesting--; + if( uxCriticalNesting == 0 ) + { + portENABLE_INTERRUPTS(); + } } /*-----------------------------------------------------------*/ @@ -251,13 +251,6 @@ uint32_t ulSetInterruptMaskFromISR( void ) " bx lr " ::: "memory" ); - -#if !defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) - /* To avoid compiler warnings. The return statement will nevere be reached, - but some compilers warn if it is not included, while others won't compile if - it is. */ - return 0; -#endif } /*-----------------------------------------------------------*/ @@ -268,13 +261,6 @@ void vClearInterruptMaskFromISR( __attribute__( ( unused ) ) uint32_t ulMask ) " bx lr " ::: "memory" ); - -#if !defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) - /* Just to avoid compiler warning. ulMask is used from the asm code but - the compiler can't see that. Some compilers generate warnings without the - following line, while others generate warnings if the line is included. */ - ( void ) ulMask; -#endif } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM23/non_secure/portasm.c b/FreeRTOS/Source/portable/GCC/ARM_CM23/non_secure/portasm.c index e4fbe2d68..e57ce9db1 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM23/non_secure/portasm.c +++ b/FreeRTOS/Source/portable/GCC/ARM_CM23/non_secure/portasm.c @@ -210,13 +210,6 @@ uint32_t ulSetInterruptMaskFromISR( void ) /* __attribute__(( naked )) PRIVILEGE " bx lr \n" ::: "memory" ); - -#if !defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) - /* To avoid compiler warnings. The return statement will never be reached, - * but some compilers warn if it is not included, while others won't compile - * if it is. */ - return 0; -#endif } /*-----------------------------------------------------------*/ @@ -228,14 +221,6 @@ void vClearInterruptMaskFromISR( __attribute__( ( unused ) ) uint32_t ulMask ) / " bx lr \n" ::: "memory" ); - -#if !defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) - /* Just to avoid compiler warning. ulMask is used from the asm code but - * the compiler can't see that. Some compilers generate warnings without - * the following line, while others generate warnings if the line is - * included. */ - ( void ) ulMask; -#endif } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM23_NTZ/non_secure/portasm.c b/FreeRTOS/Source/portable/GCC/ARM_CM23_NTZ/non_secure/portasm.c index 3ce52c3d1..95ad2f2fc 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM23_NTZ/non_secure/portasm.c +++ b/FreeRTOS/Source/portable/GCC/ARM_CM23_NTZ/non_secure/portasm.c @@ -205,13 +205,6 @@ uint32_t ulSetInterruptMaskFromISR( void ) /* __attribute__(( naked )) PRIVILEGE " bx lr \n" ::: "memory" ); - -#if !defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) - /* To avoid compiler warnings. The return statement will never be reached, - * but some compilers warn if it is not included, while others won't compile - * if it is. */ - return 0; -#endif } /*-----------------------------------------------------------*/ @@ -223,14 +216,6 @@ void vClearInterruptMaskFromISR( __attribute__( ( unused ) ) uint32_t ulMask ) / " bx lr \n" ::: "memory" ); - -#if !defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) - /* Just to avoid compiler warning. ulMask is used from the asm code but - * the compiler can't see that. Some compilers generate warnings without - * the following line, while others generate warnings if the line is - * included. */ - ( void ) ulMask; -#endif } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM33/non_secure/portasm.c b/FreeRTOS/Source/portable/GCC/ARM_CM33/non_secure/portasm.c index f4be178c1..dfec22dee 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM33/non_secure/portasm.c +++ b/FreeRTOS/Source/portable/GCC/ARM_CM33/non_secure/portasm.c @@ -185,13 +185,6 @@ uint32_t ulSetInterruptMaskFromISR( void ) /* __attribute__(( naked )) PRIVILEGE " bx lr \n" ::: "memory" ); - -#if !defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) - /* To avoid compiler warnings. The return statement will never be reached, - * but some compilers warn if it is not included, while others won't compile - * if it is. */ - return 0; -#endif } /*-----------------------------------------------------------*/ @@ -203,14 +196,6 @@ void vClearInterruptMaskFromISR( __attribute__( ( unused ) ) uint32_t ulMask ) / " bx lr \n" ::: "memory" ); - -#if !defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) - /* Just to avoid compiler warning. ulMask is used from the asm code but - * the compiler can't see that. Some compilers generate warnings without - * the following line, while others generate warnings if the line is - * included. */ - ( void ) ulMask; -#endif } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM33_NTZ/non_secure/portasm.c b/FreeRTOS/Source/portable/GCC/ARM_CM33_NTZ/non_secure/portasm.c index 2f87d0f6d..b6f1bbcef 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM33_NTZ/non_secure/portasm.c +++ b/FreeRTOS/Source/portable/GCC/ARM_CM33_NTZ/non_secure/portasm.c @@ -180,13 +180,6 @@ uint32_t ulSetInterruptMaskFromISR( void ) /* __attribute__(( naked )) PRIVILEGE " bx lr \n" ::: "memory" ); - -#if !defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) - /* To avoid compiler warnings. The return statement will never be reached, - * but some compilers warn if it is not included, while others won't compile - * if it is. */ - return 0; -#endif } /*-----------------------------------------------------------*/ @@ -198,14 +191,6 @@ void vClearInterruptMaskFromISR( __attribute__( ( unused ) ) uint32_t ulMask ) / " bx lr \n" ::: "memory" ); - -#if !defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) - /* Just to avoid compiler warning. ulMask is used from the asm code but - * the compiler can't see that. Some compilers generate warnings without - * the following line, while others generate warnings if the line is - * included. */ - ( void ) ulMask; -#endif } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Source/portable/GCC/RX100/port.c b/FreeRTOS/Source/portable/GCC/RX100/port.c index 63adc0155..6fd49c804 100644 --- a/FreeRTOS/Source/portable/GCC/RX100/port.c +++ b/FreeRTOS/Source/portable/GCC/RX100/port.c @@ -46,7 +46,7 @@ /* Tasks should start with interrupts enabled and in Supervisor mode, therefore PSW is set with U and I set, and PM and IPL clear. */ -#define portINITIAL_PSW ( ( StackType_t ) 0x00030000 ) +#define portINITIAL_PSW ( ( StackType_t ) 0x00030000 ) /* The peripheral clock is divided by this value before being supplying the CMT. */ @@ -105,7 +105,7 @@ void vPortTickISR( void ) __attribute__((interrupt)); static void prvSetupTimerInterrupt( void ); #ifndef configSETUP_TICK_INTERRUPT /* The user has not provided their own tick interrupt configuration so use - the definition in this file (which uses the interval timer). */ + the definition in this file (which uses the interval timer). */ #define configSETUP_TICK_INTERRUPT() prvSetupTimerInterrupt() #endif /* configSETUP_TICK_INTERRUPT */ @@ -162,7 +162,7 @@ StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t px /* R0 is not included as it is the stack pointer. */ *pxTopOfStack = 0x00; pxTopOfStack--; - *pxTopOfStack = 0x00; + *pxTopOfStack = 0x00; pxTopOfStack--; *pxTopOfStack = portINITIAL_PSW; pxTopOfStack--; @@ -284,22 +284,22 @@ static void prvStartFirstTask( void ) /* Restore the registers from the stack of the task pointed to by pxCurrentTCB. */ - "POP R15 \n" \ + "POP R15 \n" \ /* Accumulator low 32 bits. */ - "MVTACLO R15 \n" \ - "POP R15 \n" \ + "MVTACLO R15 \n" \ + "POP R15 \n" \ /* Accumulator high 32 bits. */ - "MVTACHI R15 \n" \ + "MVTACHI R15 \n" \ /* R1 to R15 - R0 is not included as it is the SP. */ - "POPM R1-R15 \n" \ + "POPM R1-R15 \n" \ /* This pops the remaining registers. */ - "RTE \n" \ - "NOP \n" \ - "NOP \n" + "RTE \n" \ + "NOP \n" \ + "NOP \n" ); } /*-----------------------------------------------------------*/ @@ -573,14 +573,14 @@ static void prvSetupTimerInterrupt( void ) } else if( eSleepAction == eNoTasksWaitingTimeout ) { - /* Protection off. */ - SYSTEM.PRCR.WORD = portUNLOCK_KEY; + /* Protection off. */ + SYSTEM.PRCR.WORD = portUNLOCK_KEY; - /* Ready for software standby with all clocks stopped. */ + /* Ready for software standby with all clocks stopped. */ SYSTEM.SBYCR.BIT.SSBY = 1; - /* Protection on. */ - SYSTEM.PRCR.WORD = portLOCK_KEY; + /* Protection on. */ + SYSTEM.PRCR.WORD = portLOCK_KEY; /* Sleep until something happens. Calling prvSleep() will automatically reset the i bit in the PSW. */ @@ -591,18 +591,18 @@ static void prvSetupTimerInterrupt( void ) } else { - /* Protection off. */ - SYSTEM.PRCR.WORD = portUNLOCK_KEY; + /* Protection off. */ + SYSTEM.PRCR.WORD = portUNLOCK_KEY; - /* Ready for deep sleep mode. */ + /* Ready for deep sleep mode. */ SYSTEM.MSTPCRC.BIT.DSLPE = 1; SYSTEM.MSTPCRA.BIT.MSTPA28 = 1; SYSTEM.SBYCR.BIT.SSBY = 0; - /* Protection on. */ - SYSTEM.PRCR.WORD = portLOCK_KEY; + /* Protection on. */ + SYSTEM.PRCR.WORD = portLOCK_KEY; - /* Adjust the match value to take into account that the current + /* Adjust the match value to take into account that the current time slice is already partially complete. */ ulMatchValue -= ( uint32_t ) CMT0.CMCNT; CMT0.CMCOR = ( uint16_t ) ulMatchValue;