STM32CubeF1 icon indicating copy to clipboard operation
STM32CubeF1 copied to clipboard

Compiler warning for unused parameters in stm32f1xx_ll_adc.h

Open IvanSojic opened this issue 2 years ago • 5 comments

Prevent unused argument compilation warnings (with some compilers) when using stm32f1xx_ll_adc.h

Potential solution

  • A solution would be to use UNUSED macro image

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 */

IvanSojic avatar Aug 11 '23 22:08 IvanSojic

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,

RJMSTM avatar Aug 15 '23 10:08 RJMSTM

Hello @Ivan,

Please can you precise the flags used in your example for better analysis?

Thanks, Rania

RJMSTM avatar Oct 04 '23 09:10 RJMSTM

Hi @RJMSTM Currently we have enabled "-Wall -Wextra" for gcc compiler. Best regards, Ivan

IvanSojic avatar Oct 28 '23 16:10 IvanSojic

Hello, for LL drivers you can use in stm32f1xx_ll_adc.h

(void)(ADCxy_COMMON);

Regards, Rania

RJMSTM avatar Nov 28 '23 15:11 RJMSTM

ST Internal Reference: 184950

RJMSTM avatar Jun 25 '24 09:06 RJMSTM

Fixed in 42472d601caa457b02d849c7de5f9792629ee324

TOUNSTM avatar Aug 02 '24 12:08 TOUNSTM