From 5c25653daf649510876ed9b4b7718735ac166113 Mon Sep 17 00:00:00 2001 From: Steven Hartland Date: Sat, 6 Feb 2016 22:01:25 +0000 Subject: [PATCH] Fix EFI platform build failures With warnings now enabled some plaforms where failing due to warnings. * Fix st_size printed as a size_t when its actually an off_t. * Fix pointer conversion in load_elf for some 32bit platforms due to 64bit off in ef. MFC after: 2 days X-MFC-With: Sponsored by: Multiplay --- sys/boot/common/load_elf.c | 2 +- sys/boot/efi/boot1/zfs_module.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/boot/common/load_elf.c b/sys/boot/common/load_elf.c index 0ff1a15be880..3207f73e91ad 100644 --- a/sys/boot/common/load_elf.c +++ b/sys/boot/common/load_elf.c @@ -886,7 +886,7 @@ __elfN(parse_modmetadata)(struct preloaded_file *fp, elf_file_t ef, error = __elfN(reloc_ptr)(fp, ef, v, &md, sizeof(md)); if (error == EOPNOTSUPP) { md.md_cval += ef->off; - md.md_data = (void *)((uintptr_t)md.md_data + ef->off); + md.md_data = (void *)((uintptr_t)md.md_data + (uintptr_t)ef->off); } else if (error != 0) return (error); #endif diff --git a/sys/boot/efi/boot1/zfs_module.c b/sys/boot/efi/boot1/zfs_module.c index 4e2c5c4681c1..925f0b28c1b0 100644 --- a/sys/boot/efi/boot1/zfs_module.c +++ b/sys/boot/efi/boot1/zfs_module.c @@ -135,7 +135,7 @@ load(const char *filepath, dev_info_t *devinfo, void **bufp, size_t *bufsize) if ((status = bs->AllocatePool(EfiLoaderData, (UINTN)st.st_size, &buf)) != EFI_SUCCESS) { - printf("Failed to allocate load buffer %zu for pool '%s' for '%s' " + printf("Failed to allocate load buffer %zd for pool '%s' for '%s' " "(%lu)\n", st.st_size, spa->spa_name, filepath, EFI_ERROR_CODE(status)); return (EFI_INVALID_PARAMETER); }