From owner-svn-src-head@freebsd.org Tue Aug 30 20:24:51 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B2B4BC71B2; Tue, 30 Aug 2016 20:24:51 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C0E9CDA; Tue, 30 Aug 2016 20:24:51 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u7UKOonH043798; Tue, 30 Aug 2016 20:24:50 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u7UKOoTo043797; Tue, 30 Aug 2016 20:24:50 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201608302024.u7UKOoTo043797@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 30 Aug 2016 20:24:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305085 - head/contrib/tnftp/src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Aug 2016 20:24:51 -0000 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) {