diff --git a/sys/boot/amd64/efi/copy.c b/sys/boot/amd64/efi/copy.c index bebe42ed5ec2..c6cc3490817a 100644 --- a/sys/boot/amd64/efi/copy.c +++ b/sys/boot/amd64/efi/copy.c @@ -51,8 +51,8 @@ x86_efi_copy_init(void) status = BS->AllocatePages(AllocateAnyPages, EfiLoaderData, STAGE_PAGES, &staging); if (EFI_ERROR(status)) { - printf("failed to allocate staging area: %d\n", - status & EFI_ERROR_MASK); + printf("failed to allocate staging area: %lu\n", + (unsigned long)(status & EFI_ERROR_MASK)); return (status); } diff --git a/sys/boot/amd64/efi/elf64_freebsd.c b/sys/boot/amd64/efi/elf64_freebsd.c index af5b10853f4f..0fb82b062bb9 100644 --- a/sys/boot/amd64/efi/elf64_freebsd.c +++ b/sys/boot/amd64/efi/elf64_freebsd.c @@ -101,7 +101,7 @@ elf64_exec(struct preloaded_file *fp) rsdp = efi_get_table(&acpi_guid); } if (rsdp != NULL) { - sprintf(buf, "0x%016llx", rsdp); + sprintf(buf, "0x%016llx", (unsigned long long)rsdp); setenv("hint.acpi.0.rsdp", buf, 1); revision = rsdp->Revision; if (revision == 0) @@ -115,7 +115,8 @@ elf64_exec(struct preloaded_file *fp) setenv("hint.acpi.0.rsdt", buf, 1); if (revision >= 2) { /* XXX extended checksum? */ - sprintf(buf, "0x%016llx", rsdp->XsdtPhysicalAddress); + sprintf(buf, "0x%016llx", + (unsigned long long)rsdp->XsdtPhysicalAddress); setenv("hint.acpi.0.xsdt", buf, 1); sprintf(buf, "%d", rsdp->Length); setenv("hint.acpi.0.xsdt_length", buf, 1); diff --git a/sys/boot/amd64/efi/main.c b/sys/boot/amd64/efi/main.c index 0a0fa77d8526..d1ea9c3f00be 100644 --- a/sys/boot/amd64/efi/main.c +++ b/sys/boot/amd64/efi/main.c @@ -304,7 +304,7 @@ command_mode(int argc, char *argv[]) printf("couldn't set mode %d\n", mode); return (CMD_ERROR); } - sprintf(rowenv, "%d", rows); + sprintf(rowenv, "%u", (unsigned)rows); setenv("LINES", rowenv, 1); return (CMD_OK); @@ -314,7 +314,8 @@ command_mode(int argc, char *argv[]) status = conout->QueryMode(conout, i, &cols, &rows); if (EFI_ERROR(status)) break; - printf("Mode %d: %d columns, %d rows\n", i, cols, rows); + printf("Mode %d: %u columns, %u rows\n", i, (unsigned)cols, + (unsigned)rows); } if (i != 0)