mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
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
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D11678
This commit is contained in:
parent
33394ca999
commit
04a7769aa2
1 changed files with 2 additions and 2 deletions
|
|
@ -182,8 +182,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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue