summaryrefslogtreecommitdiffstats
path: root/contrib/ncurses
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2016-09-07 18:06:34 +0000
committerdim <dim@FreeBSD.org>2016-09-07 18:06:34 +0000
commitc8aefaaee85dcc4d2e237255c2d9d8b1be17a869 (patch)
tree72b813059dbb1fecc7fe2d5b5c379047322c43eb /contrib/ncurses
parentd7fd7ac304f8bb3dd6f9ff9157c1d31a196abd0b (diff)
downloadFreeBSD-src-c8aefaaee85dcc4d2e237255c2d9d8b1be17a869.zip
FreeBSD-src-c8aefaaee85dcc4d2e237255c2d9d8b1be17a869.tar.gz
MFC r304920:
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
Diffstat (limited to 'contrib/ncurses')
-rw-r--r--contrib/ncurses/ncurses/tinfo/lib_baudrate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/ncurses/ncurses/tinfo/lib_baudrate.c b/contrib/ncurses/ncurses/tinfo/lib_baudrate.c
index 252d03c..3960053 100644
--- a/contrib/ncurses/ncurses/tinfo/lib_baudrate.c
+++ b/contrib/ncurses/ncurses/tinfo/lib_baudrate.c
@@ -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[] =
{
OpenPOWER on IntegriCloud