Skip to content

Commit c841113

Browse files
committed
Fixed warnings in test build
1 parent 5f8b79a commit c841113

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/image.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1409,11 +1409,11 @@ int elf_check_image_scattered(uint8_t part, unsigned long *entry_out)
14091409
entry_out_set = 1;
14101410
}
14111411

1412-
wolfBoot_printf("EH entry offset: %d\n", entry_off);
1412+
wolfBoot_printf("EH entry offset: %d\n", (int)entry_off);
14131413
ph = (elf32_program_header *)(elf_h + entry_off);
14141414
/* Add padding until the first program header into hash function */
14151415
len = ph[0].offset - elf_hdr_sz;
1416-
wolfBoot_printf("Adding %d bytes padding\n", len);
1416+
wolfBoot_printf("Adding %d bytes padding\n", (int)len);
14171417
while (len > 0) {
14181418
if (len > PADDING_BLOCK_SIZE) {
14191419
update_hash(&ctx, padding_block, PADDING_BLOCK_SIZE);
@@ -1468,7 +1468,7 @@ int elf_check_image_scattered(uint8_t part, unsigned long *entry_out)
14681468
/* Add padding until next program header, if any. */
14691469
if ((i < entry_count - 1) && (ph[i+1].offset > (offset + filesz))) {
14701470
unsigned long padding = ph[i+1].offset - (offset + filesz);
1471-
wolfBoot_printf("Adding padding: %lu (from %p to %p)\n", padding, offset + filesz, ph[i+1].offset);
1471+
wolfBoot_printf("Adding padding: %lu (from %lx to %lx)\n", padding, (unsigned long)offset + filesz, (unsigned long)ph[i+1].offset);
14721472
while (padding > 0) {
14731473
if (padding > PADDING_BLOCK_SIZE) {
14741474
update_hash(&ctx, padding_block, PADDING_BLOCK_SIZE);
@@ -1493,7 +1493,7 @@ int elf_check_image_scattered(uint8_t part, unsigned long *entry_out)
14931493
entry_out_set = 1;
14941494
}
14951495

1496-
wolfBoot_printf("EH entry offset: %d\n", entry_off);
1496+
wolfBoot_printf("EH entry offset: %d\n", (int)entry_off);
14971497
ph = (elf64_program_header *)(elf_h + entry_off);
14981498
/* Add padding until the first program header into hash function */
14991499
len = ph[0].offset - elf_hdr_sz;

src/update_flash.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,7 @@ static int RAMFUNCTION wolfBoot_update(int fallback_allowed)
827827
wolfBoot_panic();
828828
}
829829
}
830-
wolfBoot_printf("Scattered image correctly verified. Setting entry point to %p\n", entry);
830+
wolfBoot_printf("Scattered image correctly verified. Setting entry point to %lx\n", entry);
831831
boot.fw_base = (void *)entry;
832832
#endif
833833
/* Direct Swap without power fail safety */
@@ -1091,7 +1091,7 @@ void RAMFUNCTION wolfBoot_start(void)
10911091
wolfBoot_panic();
10921092
}
10931093
}
1094-
wolfBoot_printf("Scattered image correctly verified. Setting entry point to %p\n", entry);
1094+
wolfBoot_printf("Scattered image correctly verified. Setting entry point to %lx\n", entry);
10951095
boot.fw_base = (void *)entry;
10961096
#endif
10971097

0 commit comments

Comments
 (0)