]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r321305:
authordim <dim@FreeBSD.org>
Fri, 28 Jul 2017 18:35:29 +0000 (18:35 +0000)
committerdim <dim@FreeBSD.org>
Fri, 28 Jul 2017 18:35:29 +0000 (18:35 +0000)
commit31eb7f7e785fc65d8ea88d37d9dc89d8b23d713b
treeada3bf0837a92daa40d60baba23c263eb953f19c
parent58b0ac0ae79d4f10b8cdd5fcaea6a198d81b0742
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
sys/boot/efi/boot1/zfs_module.c