svn commit: r304920 - head/contrib/ncurses/ncurses/tinfo
Dimitry Andric
dim at FreeBSD.org
Sat Aug 27 20:33:21 UTC 2016
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[] =
{
More information about the svn-src-head
mailing list