diff options
author | dim <dim@FreeBSD.org> | 2016-09-07 19:02:47 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2016-09-07 19:02:47 +0000 |
commit | 69478467da704cf56025f7ecec912611ab1e4e71 (patch) | |
tree | 8fd2710a9fdf2905fa722344c12dc2f4a1c3674f /lib/libc/stdio/fgets.c | |
parent | 3596d46a9c08dc81a1401fd8e9b7de8aaf2648c3 (diff) | |
download | FreeBSD-src-69478467da704cf56025f7ecec912611ab1e4e71.zip FreeBSD-src-69478467da704cf56025f7ecec912611ab1e4e71.tar.gz |
MFC r305345:
With clang 3.9.0, compiling ppbus(4) results in the following warnings:
sys/dev/ppbus/ppb_1284.c:296:46: error: implicit conversion from 'int'
to 'char' changes value from 144 to -112 [-Werror,-Wconstant-conversion]
if ((error = do_peripheral_wait(bus, SELECT | nBUSY, 0))) {
~~~~~~~~~~~~~~~~~~ ~~~~~~~^~~~~~~
sys/dev/ppbus/ppb_1284.c:785:48: error: implicit conversion from 'int'
to 'char' changes value from 240 to -16 [-Werror,-Wconstant-conversion]
if (do_1284_wait(bus, nACK | SELECT | PERROR | nBUSY,
~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
sys/dev/ppbus/ppb_1284.c:786:29: error: implicit conversion from 'int'
to 'char' changes value from 240 to -16 [-Werror,-Wconstant-conversion]
nACK | SELECT | PERROR | nBUSY)) {
~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
This is because nBUSY is 0x80, so the plain char argument is wrapped to
a negative value. Fix this in a minimal fashion, by using uint8_t in a
few places.
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D7771
Diffstat (limited to 'lib/libc/stdio/fgets.c')
0 files changed, 0 insertions, 0 deletions