svn commit: r305553 - in stable: 10/contrib/tnftp/src 11/contrib/tnftp/src 9/contrib/tnftp/src

Dimitry Andric dim at FreeBSD.org
Wed Sep 7 18:33:19 UTC 2016


Author: dim
Date: Wed Sep  7 18:33:18 2016
New Revision: 305553
URL: https://svnweb.freebsd.org/changeset/base/305553

Log:
  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.

Modified:
  stable/9/contrib/tnftp/src/ftp.c
Directory Properties:
  stable/9/   (props changed)
  stable/9/contrib/   (props changed)
  stable/9/contrib/tnftp/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/contrib/tnftp/src/ftp.c
  stable/11/contrib/tnftp/src/ftp.c
Directory Properties:
  stable/10/   (props changed)
  stable/11/   (props changed)

Modified: stable/9/contrib/tnftp/src/ftp.c
==============================================================================
--- stable/9/contrib/tnftp/src/ftp.c	Wed Sep  7 18:22:08 2016	(r305552)
+++ stable/9/contrib/tnftp/src/ftp.c	Wed Sep  7 18:33:18 2016	(r305553)
@@ -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-stable-9 mailing list