Skip to content

Commit

Permalink
Prevent unused argument(s) compilation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-hillmann committed Aug 13, 2022
1 parent 91829f1 commit 258b6b9
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_adc_ex.c
Original file line number Diff line number Diff line change
Expand Up @@ -778,6 +778,8 @@ HAL_StatusTypeDef HAL_ADCEx_MultiModeStop_DMA(ADC_HandleTypeDef* hadc)
uint32_t HAL_ADCEx_MultiModeGetValue(ADC_HandleTypeDef* hadc)
{
ADC_Common_TypeDef *tmpADC_Common;
/* Prevent unused argument(s) compilation warning */
UNUSED(hadc);

/* Pointer to the common control register to which is belonging hadc */
/* (Depending on STM32F4 product, there may be up to 3 ADC and 1 common */
Expand Down
4 changes: 4 additions & 0 deletions Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_exti.c
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,8 @@ uint32_t HAL_EXTI_GetPending(EXTI_HandleTypeDef *hexti, uint32_t Edge)
uint32_t regval;
uint32_t linepos;
uint32_t maskline;
/* Prevent unused argument(s) compilation warning */
UNUSED(Edge);

/* Check parameters */
assert_param(IS_EXTI_LINE(hexti->Line));
Expand Down Expand Up @@ -495,6 +497,8 @@ uint32_t HAL_EXTI_GetPending(EXTI_HandleTypeDef *hexti, uint32_t Edge)
void HAL_EXTI_ClearPending(EXTI_HandleTypeDef *hexti, uint32_t Edge)
{
uint32_t maskline;
/* Prevent unused argument(s) compilation warning */
UNUSED(Edge);

/* Check parameters */
assert_param(IS_EXTI_LINE(hexti->Line));
Expand Down
3 changes: 3 additions & 0 deletions Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr.c
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,9 @@ void HAL_PWR_DisableWakeUpPin(uint32_t WakeUpPinx)
*/
void HAL_PWR_EnterSLEEPMode(uint32_t Regulator, uint8_t SLEEPEntry)
{
/* Prevent unused argument(s) compilation warning */
UNUSED(Regulator);

/* Check the parameters */
assert_param(IS_PWR_REGULATOR(Regulator));
assert_param(IS_PWR_SLEEP_ENTRY(SLEEPEntry));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
HAL_RTC_MODULE_ENABLED define in stm32f4xx_hal_conf.h
[..]
(@) HAL RTC alarm and HAL RTC wakeup drivers cant be used with low power modes:
(@) HAL RTC alarm and HAL RTC wakeup drivers can't be used with low power modes:
The wake up capability of the RTC may be intrusive in case of prior low power mode
configuration requiring different wake up sources.
Application/Example behavior is no more guaranteed
Expand Down Expand Up @@ -270,6 +270,9 @@ void HAL_ResumeTick(void)
*/
void HAL_RTCEx_WakeUpTimerEventCallback(RTC_HandleTypeDef *hrtc)
{
/* Prevent unused argument(s) compilation warning */
UNUSED(hrtc);

HAL_IncTick();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@ void HAL_ResumeTick(void)
*/
void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)
{
/* Prevent unused argument(s) compilation warning */
UNUSED(htim);

HAL_IncTick();
}

Expand Down
3 changes: 3 additions & 0 deletions Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_adc.c
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,9 @@
*/
ErrorStatus LL_ADC_CommonDeInit(ADC_Common_TypeDef *ADCxy_COMMON)
{
/* Prevent unused argument(s) compilation warning */
UNUSED(ADCxy_COMMON);

/* Check the parameters */
assert_param(IS_ADC_COMMON_INSTANCE(ADCxy_COMMON));

Expand Down
3 changes: 3 additions & 0 deletions Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_dac.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@
*/
ErrorStatus LL_DAC_DeInit(DAC_TypeDef *DACx)
{
/* Prevent unused argument(s) compilation warning */
UNUSED(DACx);

/* Check the parameters */
assert_param(IS_DAC_ALL_INSTANCE(DACx));

Expand Down
9 changes: 9 additions & 0 deletions Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_rcc.c
Original file line number Diff line number Diff line change
Expand Up @@ -751,6 +751,9 @@ uint32_t LL_RCC_GetSDIOClockFreq(uint32_t SDIOxSource)
*/
uint32_t LL_RCC_GetRNGClockFreq(uint32_t RNGxSource)
{
/* Prevent unused argument(s) compilation warning */
UNUSED(RNGxSource);

uint32_t rng_frequency = LL_RCC_PERIPH_FREQUENCY_NO;

/* Check parameter */
Expand Down Expand Up @@ -846,6 +849,9 @@ uint32_t LL_RCC_GetCECClockFreq(uint32_t CECxSource)
*/
uint32_t LL_RCC_GetUSBClockFreq(uint32_t USBxSource)
{
/* Prevent unused argument(s) compilation warning */
UNUSED(USBxSource);

uint32_t usb_frequency = LL_RCC_PERIPH_FREQUENCY_NO;

/* Check parameter */
Expand Down Expand Up @@ -1047,6 +1053,9 @@ uint32_t LL_RCC_GetDSIClockFreq(uint32_t DSIxSource)
*/
uint32_t LL_RCC_GetLTDCClockFreq(uint32_t LTDCxSource)
{
/* Prevent unused argument(s) compilation warning */
UNUSED(LTDCxSource);

uint32_t ltdc_frequency = LL_RCC_PERIPH_FREQUENCY_NO;

/* Check parameter */
Expand Down

0 comments on commit 258b6b9

Please sign in to comment.