mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 12:54:27 +00:00
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
This commit is contained in:
parent
1e3d53e2c4
commit
8ebfbdbef8
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=304920
|
@ -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[] =
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue