8034182: Misc. warnings in java.net code
Alan Bateman
Alan.Bateman at oracle.com
Tue Feb 11 05:13:33 PST 2014
This is drive-by fix to a number of native code warnings in the
networking code.
In NET_SockaddrToInetAddress then CHECK_NULL_RETURN is used to check the
return value from setInet6Address_ipaddress but the return is an int
rather than a pointer. In PlainDatagramSocketImpl's mcast_join_leave
then the issue is using a jbyte* when a char* is expected. In
Inet6AddressImpl.c then the warning is code before declaration (the
SunStudio compilers complain about that).
While looking at these warnings then I noticed that the
setInet6Address_XXX functions (and one of the get functions) return a
jboolean but are declared to return an int. While not wrong, it's not
obvious so I changed these functions to return a jboolean.
The webrev with the proposed changes is here:
http://cr.openjdk.java.net/~alanb/8034182/webrev/
-Alan.
More information about the net-dev
mailing list