svn commit: r321660 - in stable: 10/sys/boot/efi/boot1 11/sys/boot/efi/boot1
Dimitry Andric
dim at FreeBSD.org
Fri Jul 28 18:35:30 UTC 2017
Author: dim
Date: Fri Jul 28 18:35:29 2017
New Revision: 321660
URL: https://svnweb.freebsd.org/changeset/base/321660
Log:
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
Modified:
stable/10/sys/boot/efi/boot1/zfs_module.c
Directory Properties:
stable/10/ (props changed)
Changes in other areas also in this revision:
Modified:
stable/11/sys/boot/efi/boot1/zfs_module.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/10/sys/boot/efi/boot1/zfs_module.c
==============================================================================
--- stable/10/sys/boot/efi/boot1/zfs_module.c Fri Jul 28 18:27:30 2017 (r321659)
+++ stable/10/sys/boot/efi/boot1/zfs_module.c Fri Jul 28 18:35:29 2017 (r321660)
@@ -135,8 +135,8 @@ load(const char *filepath, dev_info_t *devinfo, void *
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);
}
More information about the svn-src-stable-10
mailing list