Skip to content

Commit 3237bff

Browse files
committed
STM32F7 : remove warning
[Warning] flash_api.c@191,14: unused variable 'tmp' [-Wunused-variable]
1 parent 4d63929 commit 3237bff

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

targets/TARGET_STM/TARGET_STM32F7/flash_api.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,9 @@ uint32_t flash_get_size(const flash_t *obj)
188188
static uint32_t GetSector(uint32_t address)
189189
{
190190
uint32_t sector = 0;
191-
uint32_t tmp = address - ADDR_FLASH_SECTOR_0;
191+
192192
#if (MBED_CONF_TARGET_FLASH_DUAL_BANK) && defined(FLASH_OPTCR_nDBANK)
193+
uint32_t tmp = address - ADDR_FLASH_SECTOR_0;
193194
if (address < ADDR_FLASH_SECTOR_4) { // Sectors 0 to 3
194195
sector += tmp >> 14;
195196
} else if (address < ADDR_FLASH_SECTOR_5) { // Sector 4

0 commit comments

Comments
 (0)