From 8b74eb3a8c55dec5147d286b2bad8c1b0c22e291 Mon Sep 17 00:00:00 2001 From: Sylvio Alves Date: Mon, 1 Jul 2024 13:12:27 -0300 Subject: [PATCH] boot: main: avoid unused build warning In case ESP32 SoC is used, *start will get build warning as it is not used. Signed-off-by: Sylvio Alves --- boot/zephyr/main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/boot/zephyr/main.c b/boot/zephyr/main.c index 95da276bd..1739e3f8c 100644 --- a/boot/zephyr/main.c +++ b/boot/zephyr/main.c @@ -277,8 +277,6 @@ static void copy_img_to_SRAM(int slot, unsigned int hdr_offset) */ static void do_boot(struct boot_rsp *rsp) { - void *start; - BOOT_LOG_INF("br_image_off = 0x%x\n", rsp->br_image_off); BOOT_LOG_INF("ih_hdr_size = 0x%x\n", rsp->br_hdr->ih_hdr_size); @@ -292,7 +290,7 @@ static void do_boot(struct boot_rsp *rsp) copy_img_to_SRAM(0, rsp->br_hdr->ih_hdr_size); /* Jump to entry point */ - start = (void *)(SRAM_BASE_ADDRESS + rsp->br_hdr->ih_hdr_size); + void *start = (void *)(SRAM_BASE_ADDRESS + rsp->br_hdr->ih_hdr_size); ((void (*)(void))start)(); #endif /* CONFIG_SOC_FAMILY_ESPRESSIF_ESP32 */ }