From 642def1461fc9ea980a0eba7080da4faca91e2b2 Mon Sep 17 00:00:00 2001 From: Daniele Lacamera Date: Fri, 10 Apr 2026 05:29:54 +0200 Subject: [PATCH] Fix C89 decl-after-statement --- src/update_flash.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/update_flash.c b/src/update_flash.c index 3b981a18..8d367aa6 100644 --- a/src/update_flash.c +++ b/src/update_flash.c @@ -437,6 +437,7 @@ static int RAMFUNCTION wolfBoot_swap_and_final_erase(int resume) uintptr_t tmpBootPos = WOLFBOOT_PARTITION_SIZE - eraseLen - WOLFBOOT_SECTOR_SIZE; uint32_t tmpBuffer[TRAILER_OFFSET_WORDS + 1]; + int ret; /* open partitions (ignore failure) */ wolfBoot_open_image(boot, PART_BOOT); @@ -498,7 +499,6 @@ static int RAMFUNCTION wolfBoot_swap_and_final_erase(int resume) wb_flash_erase(boot, WOLFBOOT_PARTITION_SIZE - eraseLen, eraseLen); #ifdef EXT_ENCRYPTED - int ret; /* Initialize encryption with the saved key */ ret = wolfBoot_set_encrypt_key((uint8_t*)tmpBuffer, (uint8_t*)&tmpBuffer[ENCRYPT_KEY_SIZE / sizeof(uint32_t)]); @@ -537,7 +537,7 @@ static int RAMFUNCTION wolfBoot_swap_and_final_erase(int resume) #ifdef EXT_ENCRYPTED wolfBoot_zeroize(tmpBuffer, sizeof(tmpBuffer)); #endif - + (void)ret; return 0; } #ifdef __CCRX__