Fixed warnings in test build

pull/562/head
Daniele Lacamera 2025-04-11 16:13:57 +02:00
parent 5f8b79a3c8
commit c841113ea7
2 changed files with 6 additions and 6 deletions

View File

@ -1409,11 +1409,11 @@ int elf_check_image_scattered(uint8_t part, unsigned long *entry_out)
entry_out_set = 1;
}
wolfBoot_printf("EH entry offset: %d\n", entry_off);
wolfBoot_printf("EH entry offset: %d\n", (int)entry_off);
ph = (elf32_program_header *)(elf_h + entry_off);
/* Add padding until the first program header into hash function */
len = ph[0].offset - elf_hdr_sz;
wolfBoot_printf("Adding %d bytes padding\n", len);
wolfBoot_printf("Adding %d bytes padding\n", (int)len);
while (len > 0) {
if (len > PADDING_BLOCK_SIZE) {
update_hash(&ctx, padding_block, PADDING_BLOCK_SIZE);
@ -1468,7 +1468,7 @@ int elf_check_image_scattered(uint8_t part, unsigned long *entry_out)
/* Add padding until next program header, if any. */
if ((i < entry_count - 1) && (ph[i+1].offset > (offset + filesz))) {
unsigned long padding = ph[i+1].offset - (offset + filesz);
wolfBoot_printf("Adding padding: %lu (from %p to %p)\n", padding, offset + filesz, ph[i+1].offset);
wolfBoot_printf("Adding padding: %lu (from %lx to %lx)\n", padding, (unsigned long)offset + filesz, (unsigned long)ph[i+1].offset);
while (padding > 0) {
if (padding > PADDING_BLOCK_SIZE) {
update_hash(&ctx, padding_block, PADDING_BLOCK_SIZE);
@ -1493,7 +1493,7 @@ int elf_check_image_scattered(uint8_t part, unsigned long *entry_out)
entry_out_set = 1;
}
wolfBoot_printf("EH entry offset: %d\n", entry_off);
wolfBoot_printf("EH entry offset: %d\n", (int)entry_off);
ph = (elf64_program_header *)(elf_h + entry_off);
/* Add padding until the first program header into hash function */
len = ph[0].offset - elf_hdr_sz;

View File

@ -827,7 +827,7 @@ static int RAMFUNCTION wolfBoot_update(int fallback_allowed)
wolfBoot_panic();
}
}
wolfBoot_printf("Scattered image correctly verified. Setting entry point to %p\n", entry);
wolfBoot_printf("Scattered image correctly verified. Setting entry point to %lx\n", entry);
boot.fw_base = (void *)entry;
#endif
/* Direct Swap without power fail safety */
@ -1091,7 +1091,7 @@ void RAMFUNCTION wolfBoot_start(void)
wolfBoot_panic();
}
}
wolfBoot_printf("Scattered image correctly verified. Setting entry point to %p\n", entry);
wolfBoot_printf("Scattered image correctly verified. Setting entry point to %lx\n", entry);
boot.fw_base = (void *)entry;
#endif