Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Sep 2016 18:06:34 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r305547 - stable/11/contrib/ncurses/ncurses/tinfo
Message-ID:  <201609071806.u87I6Y3x005907@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Wed Sep  7 18:06:34 2016
New Revision: 305547
URL: https://svnweb.freebsd.org/changeset/base/305547

Log:
  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

Modified:
  stable/11/contrib/ncurses/ncurses/tinfo/lib_baudrate.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/contrib/ncurses/ncurses/tinfo/lib_baudrate.c
==============================================================================
--- stable/11/contrib/ncurses/ncurses/tinfo/lib_baudrate.c	Wed Sep  7 16:46:54 2016	(r305546)
+++ stable/11/contrib/ncurses/ncurses/tinfo/lib_baudrate.c	Wed Sep  7 18:06:34 2016	(r305547)
@@ -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[] =
 {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201609071806.u87I6Y3x005907>