Skip to content

Commit

Permalink
Prevent unused argument(s) compilation warnings in FLASH driver
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-hillmann committed Aug 23, 2022
1 parent ec2f315 commit e592af4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down Expand Up @@ -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));
Expand Down Expand Up @@ -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));
Expand Down

0 comments on commit e592af4

Please sign in to comment.