From owner-svn-src-head@freebsd.org Sat Aug 27 20:33:21 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 3377CB77963; Sat, 27 Aug 2016 20:33:21 +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 03B7EBB3; Sat, 27 Aug 2016 20:33:20 +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 u7RKXKv7022375; Sat, 27 Aug 2016 20:33:20 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u7RKXKHu022374; Sat, 27 Aug 2016 20:33:20 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201608272033.u7RKXKHu022374@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 27 Aug 2016 20:33:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r304920 - head/contrib/ncurses/ncurses/tinfo 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: Sat, 27 Aug 2016 20:33:21 -0000 Author: dim Date: Sat Aug 27 20:33:19 2016 New Revision: 304920 URL: https://svnweb.freebsd.org/changeset/base/304920 Log: In ncurses baudrate definitions, avoid warnings about implicit conversions from int to short changing the values. This applies to B38400 and higher, since their values do not fit into a short. However, since the wrapped values are still unique, and they only serve as keys, there is no problem in adding a cast to silence the warnings. This also avoids changing the ABI, which would happen if we changed NCURSES_OSPEED to int. Discussed with: Thomas Dickey MFC after: 1 week Modified: head/contrib/ncurses/ncurses/tinfo/lib_baudrate.c Modified: head/contrib/ncurses/ncurses/tinfo/lib_baudrate.c ============================================================================== --- head/contrib/ncurses/ncurses/tinfo/lib_baudrate.c Sat Aug 27 20:08:34 2016 (r304919) +++ head/contrib/ncurses/ncurses/tinfo/lib_baudrate.c Sat Aug 27 20:33:19 2016 (r304920) @@ -94,7 +94,7 @@ struct speed { int sp; /* the actual speed */ }; -#define DATA(number) { B##number, number } +#define DATA(number) { (NCURSES_OSPEED)B##number, number } static struct speed const speeds[] = {