]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/commit
MFC r305077:
authordim <dim@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 7 Sep 2016 18:22:08 +0000 (18:22 +0000)
committerdim <dim@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 7 Sep 2016 18:22:08 +0000 (18:22 +0000)
commit9c6726069ad5df3ecfb53f32c7ed9485d847e59a
treeb26a1fbfc638995ae26d360f1c8ba6c45a91ba69
parent2fa2449c7978f65a4fae7110ab5fac8dc1570e1d
MFC r305077:

Squelch clang 3.9.0 warnings about BASE (which is 32768) being converted
to -32768 when it is used as an argument to mp_itom(), in both libtelnet
and newkey.  This code has been wrong since r26238 (!), so after almost
20 years it is rather useless to try to correct it.

MFC r305086:

Fix warnings in telnet about invalid constant conversions, e.g.:

contrib/telnet/telnet/commands.c:2914:13: error: implicit conversion
from 'int' to 'char' changes value from 137 to -119
[-Werror,-Wconstant-conversion]
*lsrp++ = IPOPT_SSRR;
~ ^~~~~~~~~~
/usr/include/netinet/ip.h:152:21: note: expanded from macro 'IPOPT_SSRR'
#define IPOPT_SSRR              137             /* strict source route */
^~~
contrib/telnet/telnet/commands.c:2916:13: error: implicit conversion
from 'int' to 'char' changes value from 131 to -125
[-Werror,-Wconstant-conversion]
*lsrp++ = IPOPT_LSRR;
~ ^~~~~~~~~~
/usr/include/netinet/ip.h:148:21: note: expanded from macro 'IPOPT_LSRR'
#define IPOPT_LSRR              131             /* loose source route */
^~~

Use unsigned char buffers instead.

git-svn-id: svn://svn.freebsd.org/base/stable/9@305552 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
contrib/telnet/libtelnet/pk.c
contrib/telnet/telnet/commands.c
usr.bin/newkey/generic.c