Closed daniel-starke closed 11 months ago
Hi @daniel-starke,
Thank you for this report. The point you raised out has been fixed within other STM32cube packages and still not yet fixed on STM32CubeF4, it will be made available in the frame of a future release.
The fix is as follow :
__STATIC_INLINE uint32_t LL_ADC_DMA_GetRegAddr(ADC_TypeDef *ADCx, uint32_t Register)
{
+ /* Prevent unused argument compilation warning */
+ (void)Register;
/* Retrieve address of register DR */
return (uint32_t)&(ADCx->DR);
}
With regards,
ST Internal Reference: 125353
The exact same issue is also appearing in LL_ADC_IsActiveFlag_MST_EOCS
.
Would it be possible to fix it in that release as well?
Also, doesn't the HAL usually use the UNUSED
macro to mark unused variables?
Fixed in commit d5af56388ff037735ac99de39abf2b46f9921aa3
Describe the set-up
-Wunused
in gcc.Describe the bug The compiler warns that the parameter
Register
inLL_ADC_DMA_GetRegAddr()
is unsed.https://github.com/STMicroelectronics/STM32CubeF4/blob/3d6be4bd406f275728e0a321cc371c62a3100533/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_ll_adc.h#L1880-L1884
How To Reproduce Compile a file which includes stm32f4xx_ll_adc.h with
-Wunused
in gcc. The target shall not defineADC_MULTIMODE_SUPPORT
.Additional context I propose to add
UNUSED(Register);
at the beginning ofLL_ADC_DMA_GetRegAddr()
.