STM32CubeF1
STM32CubeF1 copied to clipboard
Compiler warning for unused parameters in stm32f1xx_ll_adc.h
Prevent unused argument compilation warnings (with some compilers) when using stm32f1xx_ll_adc.h
Potential solution
- A solution would be to use UNUSED macro
Open topic Where would be a good place to redefine UNUSED macro? For HAL it is done inside stm32f1xx_hal_def.h
#if !defined(UNUSED) #define UNUSED(X) (void)X /* To avoid gcc/g++ warnings / #endif / UNUSED */
Hello @IvanSojic,
Thank you for this report. We will get back to you as soon as we analyze it further. This may take some time. Thank you for your comprehension.
With Regards,
Hello @Ivan,
Please can you precise the flags used in your example for better analysis?
Thanks, Rania
Hi @RJMSTM Currently we have enabled "-Wall -Wextra" for gcc compiler. Best regards, Ivan
Hello, for LL drivers you can use in stm32f1xx_ll_adc.h
(void)(ADCxy_COMMON);
Regards, Rania
ST Internal Reference: 184950
Fixed in 42472d601caa457b02d849c7de5f9792629ee324