cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CureIDE can not surpress warnings

HXiao.1
Associate II

I integrated one open source software module into my project, but I found that there are a lot of warning about unused functions, so I tried to surpress that by adding "-Wunused-function" in CubeIDE, and found the configuration is correct by checking the subdir.mk. But the warning can still be seen in the compile result. 

I do not want to see the warning, how can that be done? 

 

Subdir.mk

arm-none-eabi-gcc "317.c" -mcpu=cortex-m4 -std=gnu11 -g3 -DDEBUG -DSTM32F401xE -DUSE_STM32F4XX_NUCLEO -DUSE_HAL_DRIVER -c -I../../Inc -I../../../../../../../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I../../../../../../../Drivers/STM32F4xx_HAL_Driver/Inc -I../../../../../../../Drivers/BSP/STM32F4xx-Nucleo -I../../../../../../../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -Wunused-function -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Example/PLC/317.d" -MT"Example/PLC/317.o" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "Example/317.o"

 

Compile result:

ds.h:914:13: warning: 'SM_BAS_init__' defined but not used [-Wunused-function]

1 ACCEPTED SOLUTION

Accepted Solutions
Pavel A.
Evangelist III

-Wno-unused-function

View solution in original post

2 REPLIES 2
Pavel A.
Evangelist III

-Wno-unused-function

Thanks, it works