Fix for gcc warnings
Fixes warnings treated as errors when upgrading gcc crate to 0.3.54.
Warnings are due to non-used variables and comparison between signed
and unsigned.
Signed-off-by: Fabio Utzig <utzig@apache.org>
diff --git a/boot/bootutil/src/loader.c b/boot/bootutil/src/loader.c
index 9a921d8..b5e5c4a 100644
--- a/boot/bootutil/src/loader.c
+++ b/boot/bootutil/src/loader.c
@@ -149,7 +149,7 @@
struct boot_swap_state state_scratch;
struct boot_swap_state state_slot0;
int rc;
- int i;
+ size_t i;
uint8_t source;
rc = boot_read_swap_state_by_id(FLASH_AREA_IMAGE_0, &state_slot0);
@@ -1068,7 +1068,7 @@
uint32_t sz;
int first_sector_idx;
int last_sector_idx;
- int swap_idx;
+ uint32_t swap_idx;
struct image_header *hdr;
uint32_t size;
uint32_t copy_size;