From ec2f31552d93159a7fc6a1a8bf7d532098edae5d Mon Sep 17 00:00:00 2001 From: Michael Hillmann Date: Sat, 13 Aug 2022 15:02:39 +0200 Subject: [PATCH] Prevent empty translation unit when no FMPI2C exists. --- Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_fmpi2c.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_fmpi2c.c b/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_fmpi2c.c index 04966ea018..4caa41914c 100644 --- a/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_fmpi2c.c +++ b/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_fmpi2c.c @@ -212,6 +212,12 @@ void LL_FMPI2C_StructInit(LL_FMPI2C_InitTypeDef *FMPI2C_InitStruct) /** * @} */ +#else + +/* Prevent empty translation unit when no FMPI2C exists. + * "error: ISO C forbids an empty translation unit [-Werror=pedantic]" + */ +void Empty_STM32F4xx_II_FMPI2C_C(void) {;} #endif /* FMPI2C_CR1_PE */ #endif /* USE_FULL_LL_DRIVER */