Skip to content

Commit d6cce06

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

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
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 %x to %x)\n", padding, (unsigned)offset + filesz, (unsigned)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;

0 commit comments

Comments
 (0)