From 29042017d719354f6fa227e24016a10236859e1a Mon Sep 17 00:00:00 2001 From: Tomasz Chyrowicz Date: Fri, 3 Oct 2025 13:06:02 +0200 Subject: [PATCH 1/2] [nrf fromtree] bootutil: Fix minor issues Fix uninitialized variable warning as well as compile time issue, when the slotted dependencies are enabled. Signed-off-by: Tomasz Chyrowicz (cherry picked from commit 9ca088179e611ebd0054b0ef503039132c7a0ad1) --- boot/bootutil/src/loader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boot/bootutil/src/loader.c b/boot/bootutil/src/loader.c index 232557414..6c05b3b2b 100644 --- a/boot/bootutil/src/loader.c +++ b/boot/bootutil/src/loader.c @@ -612,7 +612,7 @@ boot_verify_slot_dependencies(struct boot_loader_state *state, uint32_t slot) #ifdef MCUBOOT_VERSION_CMP_USE_SLOT_NUMBER /* Validate against possible dependency slot values. */ - switch(dep->slot) { + switch(dep.slot) { case VERSION_DEP_SLOT_ACTIVE: case VERSION_DEP_SLOT_PRIMARY: case VERSION_DEP_SLOT_SECONDARY: From 791c72b0944b7f2259ebef2e53347b4321610d31 Mon Sep 17 00:00:00 2001 From: Tomasz Chyrowicz Date: Fri, 3 Oct 2025 13:30:09 +0200 Subject: [PATCH 2/2] [nrf noup] mcuboot: Fix warning nrf-squash! [nrf noup] bootloader: Add bootloader requests Fix a warning for uninitialized variable. Ref: NCSDK-35733 Signed-off-by: Tomasz Chyrowicz --- boot/bootutil/src/bootutil_public.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/boot/bootutil/src/bootutil_public.c b/boot/bootutil/src/bootutil_public.c index c43a47a8b..f54dd6151 100644 --- a/boot/bootutil/src/bootutil_public.c +++ b/boot/bootutil/src/bootutil_public.c @@ -563,6 +563,9 @@ static int flash_area_to_image_slot(const struct flash_area *fa, uint32_t *slot) ++i; } + + /* Image not found */ + *slot = UINT32_MAX; #else (void)fa; if (slot != NULL) {