diff options
author | dim <dim@FreeBSD.org> | 2016-09-07 18:33:18 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2016-09-07 18:33:18 +0000 |
commit | 4d19178d780d7e359b1607d0ababb652c6e38e11 (patch) | |
tree | 0dbfe0db73b03e82f9a32d8dfdf72cc9bcea6f86 /contrib | |
parent | 5c954e81b3f20c7643e320d244e2da30fcea2e67 (diff) | |
download | FreeBSD-src-4d19178d780d7e359b1607d0ababb652c6e38e11.zip FreeBSD-src-4d19178d780d7e359b1607d0ababb652c6e38e11.tar.gz |
MFC r305085:
Fix warnings in tnftp about invalid constant conversions, e.g.:
contrib/tnftp/src/ftp.c:2067:11: error: implicit conversion from 'int'
to 'char' changes value from 255 to -1 [-Werror,-Wconstant-conversion]
buf[0] = IAC;
~ ^~~
/usr/include/arpa/telnet.h:39:13: note: expanded from macro 'IAC'
#define IAC 255 /* interpret as command: */
^~~
contrib/tnftp/src/ftp.c:2068:11: error: implicit conversion from 'int'
to 'char' changes value from 244 to -12 [-Werror,-Wconstant-conversion]
buf[1] = IP;
~ ^~
/usr/include/arpa/telnet.h:50:12: note: expanded from macro 'IP'
#define IP 244 /* interrupt process--permanently */
^~~
Use an unsigned char buffer instead.
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/tnftp/src/ftp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/tnftp/src/ftp.c b/contrib/tnftp/src/ftp.c index 4c4942f..82d4042 100644 --- a/contrib/tnftp/src/ftp.c +++ b/contrib/tnftp/src/ftp.c @@ -2050,7 +2050,7 @@ abort_squared(int dummy) void abort_remote(FILE *din) { - char buf[BUFSIZ]; + unsigned char buf[BUFSIZ]; int nfnd; if (cout == NULL) { |