From e592af47caadb1edd39932de3a65d7f1c9594ea2 Mon Sep 17 00:00:00 2001 From: Michael Hillmann Date: Tue, 23 Aug 2022 21:10:15 +0200 Subject: [PATCH] Prevent unused argument(s) compilation warnings in FLASH driver --- Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c b/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c index d99eacec3a..432d8590c1 100644 --- a/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c +++ b/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c @@ -950,6 +950,9 @@ static HAL_StatusTypeDef FLASH_OB_DisablePCROP(uint32_t SectorBank1, uint32_t Se */ static void FLASH_MassErase(uint8_t VoltageRange, uint32_t Banks) { + /* Prevent unused argument(s) compilation warning */ + UNUSED(Banks); + /* Check the parameters */ assert_param(IS_VOLTAGERANGE(VoltageRange)); assert_param(IS_FLASH_BANK(Banks)); @@ -1030,6 +1033,8 @@ void FLASH_Erase_Sector(uint32_t Sector, uint8_t VoltageRange) static HAL_StatusTypeDef FLASH_OB_EnableWRP(uint32_t WRPSector, uint32_t Banks) { HAL_StatusTypeDef status = HAL_OK; + /* Prevent unused argument(s) compilation warning */ + UNUSED(Banks); /* Check the parameters */ assert_param(IS_OB_WRP_SECTOR(WRPSector)); @@ -1066,6 +1071,8 @@ static HAL_StatusTypeDef FLASH_OB_EnableWRP(uint32_t WRPSector, uint32_t Banks) static HAL_StatusTypeDef FLASH_OB_DisableWRP(uint32_t WRPSector, uint32_t Banks) { HAL_StatusTypeDef status = HAL_OK; + /* Prevent unused argument(s) compilation warning */ + UNUSED(Banks); /* Check the parameters */ assert_param(IS_OB_WRP_SECTOR(WRPSector));