tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rj...@apache.org
Subject svn commit: r1350280 - in /tomcat/native/branches/1.1.x/native/src: file.c network.c
Date Thu, 14 Jun 2012 14:54:48 GMT
Author: rjung
Date: Thu Jun 14 14:54:48 2012
New Revision: 1350280

URL: http://svn.apache.org/viewvc?rev=1350280&view=rev
Log:
Cast pointers to fix compiler warnings about
pointer signedness differences on Solaris.

Modified:
    tomcat/native/branches/1.1.x/native/src/file.c
    tomcat/native/branches/1.1.x/native/src/network.c

Modified: tomcat/native/branches/1.1.x/native/src/file.c
URL: http://svn.apache.org/viewvc/tomcat/native/branches/1.1.x/native/src/file.c?rev=1350280&r1=1350279&r2=1350280&view=diff
==============================================================================
--- tomcat/native/branches/1.1.x/native/src/file.c (original)
+++ tomcat/native/branches/1.1.x/native/src/file.c Thu Jun 14 14:54:48 2012
@@ -381,13 +381,13 @@ TCN_IMPLEMENT_CALL(jint, File, writev)(T
     for (i = 0; i < nvec; i++) {
         ba[i] = (*e)->GetObjectArrayElement(e, bufs, i);
         vec[i].iov_len  = (*e)->GetArrayLength(e, ba[i]);
-        vec[i].iov_base = (*e)->GetByteArrayElements(e, ba[i], NULL);
+        vec[i].iov_base = (void *)((*e)->GetByteArrayElements(e, ba[i], NULL));
     }
 
     ss = apr_file_writev(f, vec, nvec, &written);
 
     for (i = 0; i < nvec; i++) {
-        (*e)->ReleaseByteArrayElements(e, ba[i], vec[i].iov_base, JNI_ABORT);
+        (*e)->ReleaseByteArrayElements(e, ba[i], (jbyte *)vec[i].iov_base, JNI_ABORT);
     }
     if (ss == APR_SUCCESS)
         return (jint)written;
@@ -415,7 +415,7 @@ TCN_IMPLEMENT_CALL(jint, File, writevFul
     for (i = 0; i < nvec; i++) {
         ba[i] = (*e)->GetObjectArrayElement(e, bufs, i);
         vec[i].iov_len  = (*e)->GetArrayLength(e, ba[i]);
-        vec[i].iov_base = (*e)->GetByteArrayElements(e, ba[i], NULL);
+        vec[i].iov_base = (void *)((*e)->GetByteArrayElements(e, ba[i], NULL));
     }
 #if (APR_VERSION_MAJOR >= 1) && (APR_VERSION_MINOR >= 1)
     ss = apr_file_writev_full(f, vec, nvec, &written);
@@ -424,7 +424,7 @@ TCN_IMPLEMENT_CALL(jint, File, writevFul
 #endif
 
     for (i = 0; i < nvec; i++) {
-        (*e)->ReleaseByteArrayElements(e, ba[i], vec[i].iov_base,
+        (*e)->ReleaseByteArrayElements(e, ba[i], (jbyte *)vec[i].iov_base,
                                        JNI_ABORT);
     }
     if (ss == APR_SUCCESS)

Modified: tomcat/native/branches/1.1.x/native/src/network.c
URL: http://svn.apache.org/viewvc/tomcat/native/branches/1.1.x/native/src/network.c?rev=1350280&r1=1350279&r2=1350280&view=diff
==============================================================================
--- tomcat/native/branches/1.1.x/native/src/network.c (original)
+++ tomcat/native/branches/1.1.x/native/src/network.c Thu Jun 14 14:54:48 2012
@@ -665,13 +665,13 @@ TCN_IMPLEMENT_CALL(jint, Socket, sendv)(
     for (i = 0; i < nvec; i++) {
         ba[i] = (*e)->GetObjectArrayElement(e, bufs, i);
         vec[i].iov_len  = (*e)->GetArrayLength(e, ba[i]);
-        vec[i].iov_base = (*e)->GetByteArrayElements(e, ba[i], NULL);
+        vec[i].iov_base = (void *)((*e)->GetByteArrayElements(e, ba[i], NULL));
     }
 
     ss = (*s->net->sendv)(s->opaque, vec, nvec, &written);
 
     for (i = 0; i < nvec; i++) {
-        (*e)->ReleaseByteArrayElements(e, ba[i], vec[i].iov_base, JNI_ABORT);
+        (*e)->ReleaseByteArrayElements(e, ba[i], (jbyte*)vec[i].iov_base, JNI_ABORT);
     }
     if (ss == APR_SUCCESS)
         return (jint)written;
@@ -1217,12 +1217,12 @@ TCN_IMPLEMENT_CALL(jlong, Socket, sendfi
     for (i = 0; i < nh; i++) {
         hba[i] = (*e)->GetObjectArrayElement(e, headers, i);
         hvec[i].iov_len  = (*e)->GetArrayLength(e, hba[i]);
-        hvec[i].iov_base = (*e)->GetByteArrayElements(e, hba[i], NULL);
+        hvec[i].iov_base = (void *)((*e)->GetByteArrayElements(e, hba[i], NULL));
     }
     for (i = 0; i < nt; i++) {
         tba[i] = (*e)->GetObjectArrayElement(e, trailers, i);
         tvec[i].iov_len  = (*e)->GetArrayLength(e, tba[i]);
-        tvec[i].iov_base = (*e)->GetByteArrayElements(e, tba[i], NULL);
+        tvec[i].iov_base = (void *)((*e)->GetByteArrayElements(e, tba[i], NULL));
     }
     hdrs.headers = &hvec[0];
     hdrs.numheaders = nh;
@@ -1240,11 +1240,11 @@ TCN_IMPLEMENT_CALL(jlong, Socket, sendfi
 #endif
 
     for (i = 0; i < nh; i++) {
-        (*e)->ReleaseByteArrayElements(e, hba[i], hvec[i].iov_base, JNI_ABORT);
+        (*e)->ReleaseByteArrayElements(e, hba[i], (jbyte*)hvec[i].iov_base, JNI_ABORT);
     }
 
     for (i = 0; i < nt; i++) {
-        (*e)->ReleaseByteArrayElements(e, tba[i], tvec[i].iov_base, JNI_ABORT);
+        (*e)->ReleaseByteArrayElements(e, tba[i], (jbyte*)tvec[i].iov_base, JNI_ABORT);
     }
     /* Return Number of bytes actually sent,
      * including headers, file, and trailers



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message