diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-07-20 20:28:31 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-07-20 20:28:31 +0000 |
commit | 9d0a88de9be645cc8fa623f531f48b53c48b024f (patch) | |
tree | 08ccf6014678640bbf4fc46670eac5058443b1b5 /sys/fs | |
parent | 04a7769aa2c3c4e8651b195bb5cf5826fb54b1d8 (diff) | |
download | src-9d0a88de9be645cc8fa623f531f48b53c48b024f.tar.gz src-9d0a88de9be645cc8fa623f531f48b53c48b024f.zip |
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
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D11679
Notes
Notes:
svn path=/head/; revision=321306
Diffstat (limited to 'sys/fs')
0 files changed, 0 insertions, 0 deletions