From 9f6fb41fb056ee5dd63b7968eab0280dc02af1cc Mon Sep 17 00:00:00 2001 From: Flavio Cruz Date: Mon, 26 Dec 2022 19:15:38 -0500 Subject: Fix inttypes.h format constants for uintptr_t and intptr_t. The format constants are not correct for 32 bits and there was duplication for PRIx* constants (replaced with octal constants). Fixed a few format warnings too. Message-Id: --- i386/i386at/model_dep.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'i386/i386at/model_dep.c') diff --git a/i386/i386at/model_dep.c b/i386/i386at/model_dep.c index 0fc99406..f677e134 100644 --- a/i386/i386at/model_dep.c +++ b/i386/i386at/model_dep.c @@ -32,6 +32,7 @@ * Basic initialization for I386 - ISA bus machines. */ +#include #include #include @@ -607,7 +608,7 @@ void c_boot_entry(vm_offset_t bi) strtab_size = (vm_offset_t)phystokv(boot_info.shdr_size); kern_sym_end = kern_sym_start + 4 + symtab_size + strtab_size; - printf("kernel symbol table at %08lx-%08lx (%ld,%ld)\n", + printf("kernel symbol table at %08" PRIxPTR "-%08" PRIxPTR " (%ld,%ld)\n", kern_sym_start, kern_sym_end, (unsigned long) symtab_size, (unsigned long) strtab_size); } @@ -620,7 +621,7 @@ void c_boot_entry(vm_offset_t bi) elf_shdr_addr = (vm_offset_t)phystokv(boot_info.shdr_addr); elf_shdr_shndx = boot_info.shdr_strndx; - printf("ELF section header table at %08lx\n", elf_shdr_addr); + printf("ELF section header table at %08" PRIxPTR "\n", elf_shdr_addr); } #endif /* MACH_KDB */ #endif /* MACH_XEN */ -- cgit v1.2.3