Hi,
I’m developing an application in C using the ST STM32 platform (15.4.0) and every other time I’m compiling, I see a number of ‘implicit declaration of function’ compiler warnings:
Building in release mode
Compiling .pio\build\nucleo_f072rb\src\ltb_eeprom.o
src\ltb_eeprom.c: In function 'ltbEEPROMInitialize':
src\ltb_eeprom.c:56:5: warning: implicit declaration of function 'MX_I2C2_Init'; did you mean 'HAL_I2C_Init'? [-Wimplicit-function-declaration]
MX_I2C2_Init();
^~~~~~~~~~~~
HAL_I2C_Init
the functions are defined, the linker can link the executable just fine and the application works as expected. But these warnings clutter the output and could lead to me overlooking an actual implicit function declaration. The warnings seem to appear only with HAL functions generated by STM32CubeMX’s code generator. Also, I don’t see the same warnings every time, sometimes its just one warning, other times its 5+ different warnings.
Does anyone know how these warnings can be fixed (or suppressed for HAL functions only)?