Yu - 2024-08-30

I'm working on an MCU firmwre project. Some pointer conversion is done in the library header file from chip vendor, such as

"#define TIM1                ((TIM_TypeDef *) TIM1_BASE)",

In my source file, calling function such as

TIM_Cmd(TIM1, ENABLE);

will cause a warning like "A conversion should not be performed between a pointer to object and an integer type"

Since the conversion happens in the library header file, there's no way to fix it. I already suppressed the warnings of library sources by providing a suppressions_list.txt as below:

*:${CMAKE_CURRENT_SOURCE_DIR}/mcu/*.*
*:${CMAKE_CURRENT_SOURCE_DIR}/lib/*.*

How can I suppress the warning without suppressing all warnings of this type globally? Thank you!