Getting compiler warnings for core_cm33.h

Hi, the C++ part of our project generates a lot of warnings like these for the inline functions in core_cm33.h.  
I have the following GNU Arm Embedded Toolchains installed. I don't know if it is a problem that there are two installed:
10.3-2021-07
10.3-2021.10

The functions that generate the warning are:
__NVIC_EnableIRQ, __NVIC_GetEnableIRQ__NVIC_DisableIRQ__NVIC_GetPendingIRQ__NVIC_SetPendingIRQ__NVIC_ClearPendingIRQ__NVIC_GetActive

Why is this and how can we resolve it?  It creates so much "noise" that one misses the important warnings.

Building file: ../External/Src/Project/System/ThreadX/Event.cpp
In file included from <<user>>/iDM_APEX/ra/fsp/src/rm_threadx_port/tx_cmsis.h:55,
                 from <<user>>/iDM_APEX/ra/fsp/src/rm_threadx_port/tx_port_vendor.h:6,
                 from <<user>>/iDM_APEX/ra/fsp/src/rm_threadx_port/tx_port.h:46,
                 from <<user>>/iDM_APEX/ra/microsoft/azure-rtos/threadx/common/inc/tx_api.h:109,
                 from <<user>>/iDM_APEX/External/Src/Project/System/ThreadX/Private/Thread_Private.h:13,
                 from <<user>>/iDM_APEX/External/Src/Project/System/ThreadX/Thread.h:12,
                 from <<user>>/iDM_APEX/External/Src/Project/System/ThreadX/Event.h:13,
                 from ../External/Src/Project/System/ThreadX/Event.cpp:9:
<<user>>/iDM_APEX/ra/arm/CMSIS_5/CMSIS/Core/Include/core_cm33.h: In function 'void __NVIC_EnableIRQ(IRQn_Type)':
<<user>>/iDM_APEX/ra/arm/CMSIS_5/CMSIS/Core/Include/core_cm33.h:2383:83: warning: the result of the conversion is unspecified because '31' is outside the range of type 'IRQn_Type' {aka 'IRQn'} [-Wconversion]
 2383 |     NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
      |                                                                                   ^~~~~~
<<user>>/iDM_APEX/ra/arm/CMSIS_5/CMSIS/Core/Include/core_cm33.h: In function 'uint32_t __NVIC_GetEnableIRQ(IRQn_Type)':
<<user>>/iDM_APEX/ra/arm/CMSIS_5/CMSIS/Core/Include/core_cm33.h:2401:93: warning: the result of the conversion is unspecified because '31' is outside the range of type 'IRQn_Type' {aka 'IRQn'} [-Wconversion]
 2401 |     return((uint32_t)(((NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL));
      |                                                                                             ^~~~~~
<<user>>/iDM_APEX/ra/arm/CMSIS_5/CMSIS/Core/Include/core_cm33.h: In function 'void __NVIC_DisableIRQ(IRQn_Type)':
<<user>>/iDM_APEX/ra/arm/CMSIS_5/CMSIS/Core/Include/core_cm33.h:2420:83: warning: the result of the conversion is unspecified because '31' is outside the range of type 'IRQn_Type' {aka 'IRQn'} [-Wconversion]
 2420 |     NVIC->ICER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
      |                                                                                   ^~~~~~
<<user>>/iDM_APEX/ra/arm/CMSIS_5/CMSIS/Core/Include/core_cm33.h: In function 'uint32_t __NVIC_GetPendingIRQ(IRQn_Type)':
<<user>>/iDM_APEX/ra/arm/CMSIS_5/CMSIS/Core/Include/core_cm33.h:2439:93: warning: the result of the conversion is unspecified because '31' is outside the range of type 'IRQn_Type' {aka 'IRQn'} [-Wconversion]
 2439 |     return((uint32_t)(((NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL));
      |                                                                                             ^~~~~~
<<user>>/iDM_APEX/ra/arm/CMSIS_5/CMSIS/Core/Include/core_cm33.h: In function 'void __NVIC_SetPendingIRQ(IRQn_Type)':
<<user>>/iDM_APEX/ra/arm/CMSIS_5/CMSIS/Core/Include/core_cm33.h:2458:83: warning: the result of the conversion is unspecified because '31' is outside the range of type 'IRQn_Type' {aka 'IRQn'} [-Wconversion]
 2458 |     NVIC->ISPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
      |                                                                                   ^~~~~~
<<user>>/iDM_APEX/ra/arm/CMSIS_5/CMSIS/Core/Include/core_cm33.h: In function 'void __NVIC_ClearPendingIRQ(IRQn_Type)':
<<user>>/iDM_APEX/ra/arm/CMSIS_5/CMSIS/Core/Include/core_cm33.h:2473:83: warning: the result of the conversion is unspecified because '31' is outside the range of type 'IRQn_Type' {aka 'IRQn'} [-Wconversion]
 2473 |     NVIC->ICPR[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL));
      |                                                                                   ^~~~~~
<<user>>/iDM_APEX/ra/arm/CMSIS_5/CMSIS/Core/Include/core_cm33.h: In function 'uint32_t __NVIC_GetActive(IRQn_Type)':
<<user>>/iDM_APEX/ra/arm/CMSIS_5/CMSIS/Core/Include/core_cm33.h:2490:93: warning: the result of the conversion is unspecified because '31' is outside the range of type 'IRQn_Type' {aka 'IRQn'} [-Wconversion]
 2490 |     return((uint32_t)(((NVIC->IABR[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL));
      |                

Parents Reply Children