diff options
author | dim <dim@FreeBSD.org> | 2017-07-28 18:47:04 +0000 |
---|---|---|
committer | Luiz Souza <luiz@netgate.com> | 2018-02-24 03:14:54 -0300 |
commit | 45abe21e5c144286dde6a6648e4ac96f37b9ff2a (patch) | |
tree | 5d4aa955f7a9895b575c1e237639e50318622c02 /contrib/libc++/src | |
parent | e121cea29ef9da649959dcfcfd6e42b212b04136 (diff) | |
download | FreeBSD-src-45abe21e5c144286dde6a6648e4ac96f37b9ff2a.zip FreeBSD-src-45abe21e5c144286dde6a6648e4ac96f37b9ff2a.tar.gz |
MFC r321306:
Fix printf format warning in iflib.c
Clang 5.0.0 got better warnings about printf format strings using %zd,
and this leads to the following -Werror warning on e.g. arm:
sys/net/iflib.c:1517:8: error: format specifies type 'ssize_t' (aka 'int') but the argument has type 'bus_size_t' (aka 'unsigned long') [-Werror,-Wformat]
sctx->isc_tx_maxsize, nsegments, sctx->isc_tx_maxsegsize);
^~~~~~~~~~~~~~~~~~~~
sys/net/iflib.c:1517:41: error: format specifies type 'ssize_t' (aka 'int') but the argument has type 'bus_size_t' (aka 'unsigned long') [-Werror,-Wformat]
sctx->isc_tx_maxsize, nsegments, sctx->isc_tx_maxsegsize);
^~~~~~~~~~~~~~~~~~~~~~~
Fix this by casting bus_size_t arguments to uintmax_t, and using %ju
instead.
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D11679
(cherry picked from commit 58bfec3f9f30e99a0addd75812351da4d35fd9ba)
Diffstat (limited to 'contrib/libc++/src')
0 files changed, 0 insertions, 0 deletions