This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM6442: tiarmclang: suppress warnings from inside code

Part Number: AM6442

Tool/software:

Hi,

we are currently working on a project with MCU+ SDK for AM64 and using tiarmclang as compiler. However, when compiling, hundreds of warnings are being generated, and most of them come from inside the SDK header files, which are included many times over different ways:

In file included from C:/Gavrailov/repos/vemxxx/rt-fw/source/sysconfig/ti_board_config.c:35:
In file included from C:/Gavrailov/repos/vemxxx/rt-fw/source/sysconfig\ti_board_config.h:40:
In file included from C:/Gavrailov/repos/vemxxx/rt-fw/source/sysconfig\ti_drivers_config.h:195:
In file included from c:/ti/mcu_plus_sdk_am64x_10_00_00_20/source\drivers/udma.h:82:
c:/ti/mcu_plus_sdk_am64x_10_00_00_20/source\drivers/udma/include/csl_pktdma_cppi5.h:286:68: warning: unused parameter 'descType' [-Wunused-parameter]
  286 | static inline void CSL_pktdmaCppi5SetPktLen( void *pDesc, uint32_t descType, uint32_t pktLen )
      |                                                                    ^
c:/ti/mcu_plus_sdk_am64x_10_00_00_20/source\drivers/udma/include/csl_pktdma_cppi5.h:575:65: warning: unused parameter 'pDesc' [-Wunused-parameter]
  575 | static inline uint32_t CSL_pktdmaCppi5GetPsDataLoc( const void *pDesc )
      |                                                                 ^
c:/ti/mcu_plus_sdk_am64x_10_00_00_20/source\drivers/udma/include/csl_pktdma_cppi5.h:592:55: warning: unused parameter 'pDesc' [-Wunused-parameter]
  592 | static inline void CSL_pktdmaCppi5SetPsDataLoc( void *pDesc, uint32_t psLoc )
      |                                                       ^
c:/ti/mcu_plus_sdk_am64x_10_00_00_20/source\drivers/udma/include/csl_pktdma_cppi5.h:592:71: warning: unused parameter 'psLoc' [-Wunused-parameter]
  592 | static inline void CSL_pktdmaCppi5SetPsDataLoc( void *pDesc, uint32_t psLoc )
      |                                                                       ^
c:/ti/mcu_plus_sdk_am64x_10_00_00_20/source\drivers/udma/include/csl_pktdma_cppi5.h:654:78: warning: unused parameter 'bInSopBuf' [-Wunused-parameter]
  654 | static inline uint64_t CSL_pktdmaCppi5GetPsDataAddr( const void *pDesc, bool bInSopBuf, bool bEpiPresent )
      |                                                                              ^
c:/ti/mcu_plus_sdk_am64x_10_00_00_20/source\drivers/udma/include/csl_pktdma_cppi5.h:861:65: warning: unused parameter 'descType' [-Wunused-parameter]
  861 | static inline void CSL_pktdmaCppi5SetIds( void *pDesc, uint32_t descType, uint32_t pktId, uint32_t flowId )
      |                                                                 ^
c:/ti/mcu_plus_sdk_am64x_10_00_00_20/source\drivers/udma/include/csl_pktdma_cppi5.h:861:84: warning: unused parameter 'pktId' [-Wunused-parameter]
  861 | static inline void CSL_pktdmaCppi5SetIds( void *pDesc, uint32_t descType, uint32_t pktId, uint32_t flowId )

We would like to turn off the warnings at places, where those files get included and to keep the warning for the rest of the code. In GCC that would be done with the help of the corresponding pragmas:

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wuninitialized"
  foo(b);                       /* no diagnostic for this one */
#pragma GCC diagnostic pop

Unfortunately, until now we didn't find a way to do this with tiarmclang. Is this feature implemented at all?

Regards!