mirror of
git://sourceware.org/git/glibc.git
synced 2025-03-06 20:58:33 +01:00
tst-resolv-invalid-cname.c: Explicitly cast 192 and 168 to char
Explicitly cast 192 and 168 to char to silence Clang error: tst-resolv-invalid-cname.c:313:17: error: implicit conversion from 'int' to 'char' changes value from 192 to -64 [-Werror,-Wconstant-conversion] 313 | addr[0] = 192; | ~ ^~~ tst-resolv-invalid-cname.c:314:17: error: implicit conversion from 'int' to 'char' changes value from 168 to -88 [-Werror,-Wconstant-conversion] 314 | addr[1] = 168; | ~ ^~~ Signed-off-by: H.J. Lu <hjl.tools@gmail.com> Reviewed-by: Sam James <sam@gentoo.org>
This commit is contained in:
parent
0cc88d2327
commit
4666f5c3ee
1 changed files with 2 additions and 2 deletions
|
@ -310,8 +310,8 @@ check_reverse (int af, int bits, int count)
|
|||
socklen_t addrlen;
|
||||
if (af == AF_INET)
|
||||
{
|
||||
addr[0] = 192;
|
||||
addr[1] = 168;
|
||||
addr[0] = (char) 192;
|
||||
addr[1] = (char) 168;
|
||||
addr[2] = count;
|
||||
addr[3] = bits;
|
||||
addrlen = 4;
|
||||
|
|
Loading…
Add table
Reference in a new issue