Author: rjung
Date: Sat May 23 12:53:28 2015
New Revision: 1681342

URL: http://svn.apache.org/r1681342
Log:
Backport from trunk:

r988395 | mturk | 2010-08-24 08:07:28 +0200 (Tue, 24 Aug 2010) | 1 line
Fix 'dereferencing type-punned pointer will break strict-aliasing rules' warning

Modified:
    tomcat/native/branches/1.1.x/   (props changed)
    tomcat/native/branches/1.1.x/native/src/jnilib.c

Propchange: tomcat/native/branches/1.1.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat May 23 12:53:28 2015
@@ -1,3 +1,3 @@
-/tomcat/native/trunk:815411,988402,988428,992208,1043611,1043696,1205445,1295445,1342003,1342008,1342013,1342020,1342024,1394258,1394342,1424947,1424971,1430753,1437081,1438342,1439337,1441884,1441886,1442579,1442581,1445972,1507113,1532577,1532590,1539594,1555184,1559180,1588195,1607262,1607267,1607278,1607291,1607477,1648821,1650119,1650304,1658557,1658641-1658642,1658724,1669302,1669496,1681298,1681314,1681323
+/tomcat/native/trunk:815411,988395,988402,988428,992208,1043611,1043696,1205445,1295445,1342003,1342008,1342013,1342020,1342024,1394258,1394342,1424947,1424971,1430753,1437081,1438342,1439337,1441884,1441886,1442579,1442581,1445972,1507113,1532577,1532590,1539594,1555184,1559180,1588195,1607262,1607267,1607278,1607291,1607477,1648821,1650119,1650304,1658557,1658641-1658642,1658724,1669302,1669496,1681298,1681314,1681323
 /tomcat/tc7.0.x/trunk:1199985,1200164,1349932,1434887,1435769
 
/tomcat/trunk:815418,832198,1001939,1033916,1043103,1044729,1078522,1145209,1145285,1149092,1241356,1241406-1241407,1242254,1292671,1299980,1300102,1434905,1437083

Modified: tomcat/native/branches/1.1.x/native/src/jnilib.c
URL: 
http://svn.apache.org/viewvc/tomcat/native/branches/1.1.x/native/src/jnilib.c?rev=1681342&r1=1681341&r2=1681342&view=diff
==============================================================================
--- tomcat/native/branches/1.1.x/native/src/jnilib.c (original)
+++ tomcat/native/branches/1.1.x/native/src/jnilib.c Sat May 23 12:53:28 2015
@@ -43,15 +43,16 @@ int tcn_parent_pid = 0;
 JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *reserved)
 {
     JNIEnv *env;
+    void   *ppe;
     apr_version_t apv;
     int apvn;
 
     UNREFERENCED(reserved);
-    if ((*vm)->GetEnv(vm, (void **)&env, JNI_VERSION_1_4)) {
+    if ((*vm)->GetEnv(vm, &ppe, JNI_VERSION_1_4)) {
         return JNI_ERR;
     }
     tcn_global_vm = vm;
-
+    env           = (JNIEnv *)ppe;
     /* Before doing anything else check if we have a valid
      * APR version.
      */
@@ -96,13 +97,15 @@ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM
 JNIEXPORT void JNICALL JNI_OnUnload(JavaVM *vm, void *reserved)
 {
     JNIEnv *env;
+    void   *ppe;
 
     UNREFERENCED(reserved);
 
-    if ((*vm)->GetEnv(vm, (void **)&env, JNI_VERSION_1_2)) {
+    if ((*vm)->GetEnv(vm, &ppe, JNI_VERSION_1_2)) {
         return;
     }
     if (tcn_global_pool) {
+        env  = (JNIEnv *)ppe;
         TCN_UNLOAD_CLASS(env, jString_class);
         TCN_UNLOAD_CLASS(env, jFinfo_class);
         TCN_UNLOAD_CLASS(env, jAinfo_class);



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

Reply via email to