svn commit: r305085 - head/contrib/tnftp/src
Dimitry Andric
dim at FreeBSD.org
Tue Aug 30 20:24:51 UTC 2016
Author: dim
Date: Tue Aug 30 20:24:50 2016
New Revision: 305085
URL: https://svnweb.freebsd.org/changeset/base/305085
Log:
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.
MFC after: 1 week
Modified:
head/contrib/tnftp/src/ftp.c
Modified: head/contrib/tnftp/src/ftp.c
==============================================================================
--- head/contrib/tnftp/src/ftp.c Tue Aug 30 19:58:41 2016 (r305084)
+++ head/contrib/tnftp/src/ftp.c Tue Aug 30 20:24:50 2016 (r305085)
@@ -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) {
More information about the svn-src-head
mailing list