summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2017-07-28 18:35:29 +0000
committerdim <dim@FreeBSD.org>2017-07-28 18:35:29 +0000
commit1fc9905f577a28e73a62bbdb7dcdeb083d74d855 (patch)
tree10ae7b24fd8830aebc94cc8235e73fd22ba48938
parent9ef17f8a146f7222bb0463280245d8fb45f34963 (diff)
downloadFreeBSD-src-1fc9905f577a28e73a62bbdb7dcdeb083d74d855.zip
FreeBSD-src-1fc9905f577a28e73a62bbdb7dcdeb083d74d855.tar.gz
MFC r321305:
Fix printf format warning in zfs_module.c Clang 5.0.0 got better warnings about print format strings using %zd, and this leads to the following -Werror warning on e.g. arm: sys/boot/efi/boot1/zfs_module.c:186:18: error: format specifies type 'ssize_t' (aka 'int') but the argument has type 'off_t' (aka 'long long') [-Werror,-Wformat] "(%lu)\n", st.st_size, spa->spa_name, filepath, EFI_ERROR_CODE(status)); ^~~~~~~~~~ Fix this by casting off_t arguments to intmax_t, and using %jd instead. Reviewed by: tsoome Differential Revision: https://reviews.freebsd.org/D11678
-rw-r--r--sys/boot/efi/boot1/zfs_module.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/boot/efi/boot1/zfs_module.c b/sys/boot/efi/boot1/zfs_module.c
index 925f0b2..673ca34 100644
--- a/sys/boot/efi/boot1/zfs_module.c
+++ b/sys/boot/efi/boot1/zfs_module.c
@@ -135,8 +135,8 @@ 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 %zd for pool '%s' for '%s' "
- "(%lu)\n", st.st_size, spa->spa_name, filepath, EFI_ERROR_CODE(status));
+ printf("Failed to allocate load buffer %jd for pool '%s' for '%s' "
+ "(%lu)\n", (intmax_t)st.st_size, spa->spa_name, filepath, EFI_ERROR_CODE(status));
return (EFI_INVALID_PARAMETER);
}
OpenPOWER on IntegriCloud