From 9ae634f3bfeb99111b0ceda26f4b4ba6f87d4c12 Mon Sep 17 00:00:00 2001 From: Thomas Altenbach Date: Fri, 10 May 2024 15:21:37 +0200 Subject: [PATCH] bootutil: Fix signed/unsigned comparison in boot_read_enc_key When MCUBOOT_SWAP_SAVE_ENCTLV is enabled, a comparison between a signed and an unsigned integer is made in boot_read_enc_key. This might cause a warning to be emitted at compile-time. Signed-off-by: Thomas Altenbach --- boot/bootutil/src/bootutil_misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boot/bootutil/src/bootutil_misc.c b/boot/bootutil/src/bootutil_misc.c index 87b86350..614c2e07 100644 --- a/boot/bootutil/src/bootutil_misc.c +++ b/boot/bootutil/src/bootutil_misc.c @@ -268,7 +268,7 @@ boot_read_enc_key(const struct flash_area *fap, uint8_t slot, struct boot_status { uint32_t off; #if MCUBOOT_SWAP_SAVE_ENCTLV - int i; + uint32_t i; #endif int rc;