diff src/solaris/native/java/net/net_util_md.c @ 453:b7fce4bac617

6729881: Compiler warning in networking native code Summary: Cleanup compiler warnings Reviewed-by: alanb, jccollet, michaelm
author chegar
date Mon, 28 Jul 2008 13:02:11 +0100
parents 37a05a11f281
children 441f88d39988
line wrap: on
line diff
--- a/src/solaris/native/java/net/net_util_md.c	Sun Jul 27 19:16:15 2008 +0800
+++ b/src/solaris/native/java/net/net_util_md.c	Mon Jul 28 13:02:11 2008 +0100
@@ -229,7 +229,7 @@
     int fd;
     void *ipv6_fn;
     SOCKADDR sa;
-    int sa_len = sizeof(sa);
+    socklen_t sa_len = sizeof(sa);
 
     fd = JVM_Socket(AF_INET6, SOCK_STREAM, 0) ;
     if (fd < 0) {
@@ -447,7 +447,6 @@
     char dest_str[40];
     struct in6_addr dest_addr;
     char device[16];
-    jboolean match = JNI_FALSE;
 
     if (loRoutes != 0) {
         free (loRoutes);
@@ -525,7 +524,7 @@
     {
         /* now find the scope_id for "lo" */
 
-        char addr6[40], devname[20];
+        char devname[20];
         char addr6p[8][5];
         int plen, scope, dad_status, if_idx;
 
@@ -1019,7 +1018,7 @@
      * index.
      */
     if (match) {
-        char addr6[40], devname[20];
+        char devname[20];
         char addr6p[8][5];
         int plen, scope, dad_status, if_idx;
 
@@ -1086,7 +1085,7 @@
     }
 #endif
 
-    rv = getsockopt(fd, level, opt, result, len);
+    rv = getsockopt(fd, level, opt, result, (socklen_t)len);
     if (rv < 0) {
         return rv;
     }