Skip to content

Commit 642def1

Browse files
committed
Fix C89 decl-after-statement
1 parent 47815c0 commit 642def1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/update_flash.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,7 @@ static int RAMFUNCTION wolfBoot_swap_and_final_erase(int resume)
437437
uintptr_t tmpBootPos = WOLFBOOT_PARTITION_SIZE - eraseLen -
438438
WOLFBOOT_SECTOR_SIZE;
439439
uint32_t tmpBuffer[TRAILER_OFFSET_WORDS + 1];
440+
int ret;
440441

441442
/* open partitions (ignore failure) */
442443
wolfBoot_open_image(boot, PART_BOOT);
@@ -498,7 +499,6 @@ static int RAMFUNCTION wolfBoot_swap_and_final_erase(int resume)
498499
wb_flash_erase(boot, WOLFBOOT_PARTITION_SIZE - eraseLen, eraseLen);
499500

500501
#ifdef EXT_ENCRYPTED
501-
int ret;
502502
/* Initialize encryption with the saved key */
503503
ret = wolfBoot_set_encrypt_key((uint8_t*)tmpBuffer,
504504
(uint8_t*)&tmpBuffer[ENCRYPT_KEY_SIZE / sizeof(uint32_t)]);
@@ -537,7 +537,7 @@ static int RAMFUNCTION wolfBoot_swap_and_final_erase(int resume)
537537
#ifdef EXT_ENCRYPTED
538538
wolfBoot_zeroize(tmpBuffer, sizeof(tmpBuffer));
539539
#endif
540-
540+
(void)ret;
541541
return 0;
542542
}
543543
#ifdef __CCRX__

0 commit comments

Comments
 (0)