Date: Fri, 4 Apr 2014 13:35:36 +0000 (UTC) From: Ed Maste <emaste@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r264115 - head/sys/boot/amd64/efi Message-ID: <201404041335.s34DZa6M004644@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: emaste Date: Fri Apr 4 13:35:36 2014 New Revision: 264115 URL: http://svnweb.freebsd.org/changeset/base/264115 Log: Fix printf format mismatches Sponsored by: The FreeBSD Foundation Modified: head/sys/boot/amd64/efi/copy.c head/sys/boot/amd64/efi/elf64_freebsd.c head/sys/boot/amd64/efi/main.c Modified: head/sys/boot/amd64/efi/copy.c ============================================================================== --- head/sys/boot/amd64/efi/copy.c Fri Apr 4 12:31:13 2014 (r264114) +++ head/sys/boot/amd64/efi/copy.c Fri Apr 4 13:35:36 2014 (r264115) @@ -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); } Modified: head/sys/boot/amd64/efi/elf64_freebsd.c ============================================================================== --- head/sys/boot/amd64/efi/elf64_freebsd.c Fri Apr 4 12:31:13 2014 (r264114) +++ head/sys/boot/amd64/efi/elf64_freebsd.c Fri Apr 4 13:35:36 2014 (r264115) @@ -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); Modified: head/sys/boot/amd64/efi/main.c ============================================================================== --- head/sys/boot/amd64/efi/main.c Fri Apr 4 12:31:13 2014 (r264114) +++ head/sys/boot/amd64/efi/main.c Fri Apr 4 13:35:36 2014 (r264115) @@ -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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201404041335.s34DZa6M004644>