harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chunr...@apache.org
Subject svn commit: r681009 - in /harmony/enhanced: classlib/trunk/modules/awt/src/main/native/lcmm/shared/ classlib/trunk/modules/awt/src/main/native/linuxfont/unix/ classlib/trunk/modules/instrument/src/main/native/instrument/shared/ classlib/trunk/modules/l...
Date Wed, 30 Jul 2008 13:24:32 GMT
Author: chunrong
Date: Wed Jul 30 06:24:28 2008
New Revision: 681009

URL: http://svn.apache.org/viewvc?rev=681009&view=rev
Log:
Apply patches for [#HARMONY-5914] Building problem due to problematic data casting

Modified:
    harmony/enhanced/classlib/trunk/modules/awt/src/main/native/lcmm/shared/NativeCMM.c
    harmony/enhanced/classlib/trunk/modules/awt/src/main/native/linuxfont/unix/LinuxNativeFont.c
    harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/shared/inst_agt.c
    harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/shared/instrument.c
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/libhlp.c
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/main.c
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/strbuf.c
    harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/common/shared/iohelp.c
    harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/common/shared/strhelp.c
    harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/shared/hynls.c
    harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/shared/hystr.c
    harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hyfiletext.c
    harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hysock.c
    harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_common.h

Modified: harmony/enhanced/classlib/trunk/modules/awt/src/main/native/lcmm/shared/NativeCMM.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/lcmm/shared/NativeCMM.c?rev=681009&r1=681008&r2=681009&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/awt/src/main/native/lcmm/shared/NativeCMM.c (original)
+++ harmony/enhanced/classlib/trunk/modules/awt/src/main/native/lcmm/shared/NativeCMM.c Wed
Jul 30 06:24:28 2008
@@ -58,7 +58,7 @@
     cmsInitialized = TRUE;
   }
 
-    hProfile = cmmOpenProfile(byteData, dataSize);
+    hProfile = cmmOpenProfile((LPBYTE)byteData, dataSize);
 
     (*env)->ReleaseByteArrayElements (env, data, byteData, 0);
 
@@ -116,7 +116,7 @@
     unsigned profileSize = (unsigned) (*env)->GetArrayLength (env, data);
     jbyte *byteData = (*env)->GetByteArrayElements(env, data, 0);
 
-  cmmGetProfile(hProfile, byteData, profileSize);
+  cmmGetProfile(hProfile, (LPBYTE)byteData, profileSize);
 
     (*env)->ReleaseByteArrayElements (env, data, byteData, 0);
 }
@@ -137,13 +137,13 @@
 
 
   if(ts == HEADER_TAG_ID) {
-        if(!cmmGetProfileHeader(hProfile, byteData, dataSize)) {
+        if(!cmmGetProfileHeader(hProfile, (LPBYTE)byteData, dataSize)) {
             newCMMException(env, errMsg); // Throw java exception if error occured
             free(errMsg);
             errMsg = NULL;
         }
     } else {
-        if(!cmmGetProfileElement(hProfile, ts, byteData, &dataSize)) {
+        if(!cmmGetProfileElement(hProfile, ts, (LPBYTE)byteData, &dataSize)) {
             newCMMException(env, errMsg); // Throw java exception if error occured
             free(errMsg);
             errMsg = NULL;
@@ -195,7 +195,7 @@
     if(dataSize != sizeof(icHeader))
       newCMMException(env, "Invalid size of the data"); // Throw java exception 
 
-        if(!cmmSetProfileHeader(hProfile, byteData))
+        if(!cmmSetProfileHeader(hProfile, (LPBYTE)byteData))
             newCMMException(env, "Invalid header data"); // Throw java exception if error
occured
 
     } else {

Modified: harmony/enhanced/classlib/trunk/modules/awt/src/main/native/linuxfont/unix/LinuxNativeFont.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/linuxfont/unix/LinuxNativeFont.c?rev=681009&r1=681008&r2=681009&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/awt/src/main/native/linuxfont/unix/LinuxNativeFont.c
(original)
+++ harmony/enhanced/classlib/trunk/modules/awt/src/main/native/linuxfont/unix/LinuxNativeFont.c
Wed Jul 30 06:24:28 2008
@@ -126,10 +126,10 @@
                 printf ("       %s", family);
 #endif /* DEBUG */
 
-                len = (strlen(family)+1);
+                len = (strlen((char *)family)+1);
                 famList[j] = (char*)malloc(sizeof(char) * len);
 
-                strncpy(famList[j], family, len);
+                strncpy(famList[j], (char *)family, len);
             } else {
                 /* 
                  * TODO
@@ -189,7 +189,7 @@
     }
 
     char *path = (char *)(*env)->GetStringUTFChars(env, fName, 0);
-    fontAdded = FcConfigAppFontAddFile(config, path);
+    fontAdded = FcConfigAppFontAddFile(config, (unsigned char*)path);
 
     unsigned short *familyName = 0;
 
@@ -248,13 +248,13 @@
     if (fid == 0) {
         (*env)->ExceptionDescribe(env);
         (*env)->ExceptionClear(env);
-        return (jlong)NULL;
+        return (jlong)(int)NULL;
     }
     dpy = (Display *)(long)(*env)->GetLongField(env, linuxFont, fid);
 
     if (dpy == NULL){
         throwNPException(env, "Cannot connect to XServer");
-        return (jlong)NULL;
+        return (jlong)(int)NULL;
     }
 
     if (jStyle & FONT_BOLD) {
@@ -281,7 +281,7 @@
     if (fid == 0) {
         (*env)->ExceptionDescribe(env);
         (*env)->ExceptionClear(env);
-        return (jlong)NULL;
+        return (jlong)(int)NULL;
     }
     scr = (*env)->GetIntField(env, linuxFont, fid);
 
@@ -299,7 +299,7 @@
             (*env)->ReleaseStringUTFChars(env, jName, name);
         }
         if(faceStyle){
-            (*env)->ReleaseStringUTFChars(env, jFaceStyle, faceStyle);
+            (*env)->ReleaseStringUTFChars(env, jFaceStyle, (char *)faceStyle);
         }
         XftPatternDestroy (pattern);
         throwNPException(env, "Error during adding family name to XFTPattern structure");
@@ -312,7 +312,7 @@
 
     if (faceStyle && !XftPatternAddString (pattern, XFT_STYLE, faceStyle)){
         if(faceStyle){
-            (*env)->ReleaseStringUTFChars(env, jFaceStyle, faceStyle);
+            (*env)->ReleaseStringUTFChars(env, jFaceStyle, (char *)faceStyle);
         }
         XftPatternDestroy (pattern);
         throwNPException(env, "Error during adding style name to XFTPattern structure");
@@ -321,7 +321,7 @@
     /* We do not need faceStyle any more */
     if(faceStyle){
         XftPatternDestroy (pattern);
-        (*env)->ReleaseStringUTFChars(env, jFaceStyle, faceStyle);
+        (*env)->ReleaseStringUTFChars(env, jFaceStyle, (char *)faceStyle);
     }
 
     if (!XftPatternAddInteger(pattern, XFT_SLANT, slant)){
@@ -414,7 +414,7 @@
 
     if (font_type == FONT_TYPE_UNDEF){
         XftFontClose (dpy, xftFnt);
-        return (jlong)NULL;
+        return (jlong)(int)NULL;
     }
 
     /* Set Font type in LinuxFont object (upcall) */
@@ -426,7 +426,7 @@
 #endif // DEBUG 
         (*env)->ExceptionDescribe(env);
         (*env)->ExceptionClear(env);
-        return (jlong)NULL;
+        return (jlong)(int)NULL;
     }
 
     (*env)->CallVoidMethod(env, linuxFont, mid, font_type);
@@ -437,7 +437,7 @@
 #endif // DEBUG 
         (*env)->ExceptionDescribe(env);
         (*env)->ExceptionClear(env);
-        return (jlong)NULL;
+        return (jlong)(int)NULL;
     }
 
     return (long)xftFnt;
@@ -484,13 +484,13 @@
     if (fid == 0) {
         (*env)->ExceptionDescribe(env);
         (*env)->ExceptionClear(env);
-        return (jlong)NULL;
+        return (jlong)(int)NULL;
     }
     dpy = (Display *)(long)(*env)->GetLongField(env, linuxFont, fid);
 
     if (dpy == NULL){
         throwNPException(env, "Cannot connect to XServer");
-        return (jlong)NULL;
+        return (jlong)(int)NULL;
     }
     
     xlfd = (*env)->GetStringUTFChars(env, jXLFD, &iscopy);
@@ -505,7 +505,7 @@
     if (fid == 0) {
         (*env)->ExceptionDescribe(env);
         (*env)->ExceptionClear(env);
-        return (jlong)NULL;
+        return (jlong)(int)NULL;
     }
     scr = (*env)->GetIntField(env, linuxFont, fid);
 
@@ -517,7 +517,7 @@
 
     if (n == 0){
         free(buffer);
-        return (jlong)NULL;
+        return (jlong)(int)NULL;
     }
 
     /* Xft part */
@@ -589,7 +589,7 @@
 
     if (font_type == FONT_TYPE_UNDEF){
         XftFontClose (dpy, xftFnt);
-        return (jlong)NULL;
+        return (jlong)(int)NULL;
     }
 
     /* Set Font type in LinuxFont object (upcall) */
@@ -601,7 +601,7 @@
 #endif // DEBUG 
         (*env)->ExceptionDescribe(env);
         (*env)->ExceptionClear(env);
-        return (jlong)NULL;
+        return (jlong)(int)NULL;
     }
  
     (*env)->CallVoidMethod(env, linuxFont, mid, font_type);
@@ -612,7 +612,7 @@
 #endif // DEBUG 
         (*env)->ExceptionDescribe(env);
         (*env)->ExceptionClear(env);
-        return (jlong)NULL;
+        return (jlong)(int)NULL;
     }
 
     return (long)xftFnt;
@@ -937,14 +937,14 @@
                 fontStyle |= FONT_ITALIC;
             }
 
-            len = snprintf(font, BUF_SIZE, fstr, family, style, fontStyle);
+            len = snprintf((char *)font, BUF_SIZE, fstr, family, style, fontStyle);
 
             if (len < 0){
                 len = BUF_SIZE;
             }
 
             fontList[j] = (char*)malloc(sizeof(char) * (len+1));
-            strncpy(fontList[j], font, len);
+            strncpy(fontList[j], (char *)font, len);
             fontList[j][len] = 0;
         }
         XftFontSetDestroy (fs);
@@ -966,7 +966,7 @@
         free(fontList);
 
         throwNPException(env, "Not enough memory to create families list");
-        return (jlong)NULL;
+        return (jlong)(int)NULL;
     }
 
     for (i = 0;i < numFonts;i++){
@@ -1347,7 +1347,7 @@
     FcStrSetDestroy (subdirs);
     FcStrListDone (list);
 
-    (*env)->ReleaseStringUTFChars(env, fName, dirName);
+    (*env)->ReleaseStringUTFChars(env, fName, (char *)dirName);
 
     return result;
 }
@@ -1387,7 +1387,7 @@
 
         XftUnlockFace(font);
     
-        return (jlong)NULL;
+        return (jlong)(int)NULL;
     }
 
     error = FT_Get_Glyph( face->glyph, &glyph );
@@ -1396,7 +1396,7 @@
 //        throwNPException(env, "NativeInitGlyphBitmap 1 : FreeType error");
         XftUnlockFace(font);
     
-        return (jlong)NULL;
+        return (jlong)(int)NULL;
     }        
     // convert to a bitmap (default render mode + destroy old)     
     if ( glyph->format != FT_GLYPH_FORMAT_BITMAP ) {                                 
                            
@@ -1406,7 +1406,7 @@
             // glyph unchanged                              
             FT_Done_Glyph( glyph );
             XftUnlockFace(font);
-            return (jlong)NULL;
+            return (jlong)(int)NULL;
         }
     }                                                              
     
@@ -1633,7 +1633,7 @@
         throwNPException(env, "getGlyphOutline : FreeType error");
         XftUnlockFace(font);
     
-        return (jlong)NULL;
+        return (jlong)(int)NULL;
     }
 
     if ((face->glyph->format & ft_glyph_format_outline) != 0){

Modified: harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/shared/inst_agt.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/shared/inst_agt.c?rev=681009&r1=681008&r2=681009&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/shared/inst_agt.c
(original)
+++ harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/shared/inst_agt.c
Wed Jul 30 06:24:28 2008
@@ -57,8 +57,8 @@
 	jbyteArray jname_bytes = (*jni_env)->NewByteArray(jni_env, name_len);
 	
 	//construct java byteArray for old class data and class name
-	(*jni_env)->SetByteArrayRegion(jni_env, jold_bytes, 0, class_data_len, (unsigned char
*)class_data);
-	(*jni_env)->SetByteArrayRegion(jni_env, jname_bytes, 0, name_len, (char *)name);
+	(*jni_env)->SetByteArrayRegion(jni_env, jold_bytes, 0, class_data_len, (jbyte *)class_data);
+	(*jni_env)->SetByteArrayRegion(jni_env, jname_bytes, 0, name_len, (jbyte *)name);
 	
 	//invoke transform method
 	jnew_bytes = (jbyteArray)(*jni_env)->CallObjectMethod(jni_env, *(gdata->inst), transform_method,
loader, jname_bytes, class_being_redefined, protection_domain, jold_bytes);	
@@ -133,13 +133,13 @@
 		jbyteArray joptions=NULL, jclass_name;
 		if(class_name){
 			jclass_name = (*env)->NewByteArray(env, strlen(class_name));
-			(*env)->SetByteArrayRegion(env, jclass_name, 0, strlen(class_name), class_name);
+			(*env)->SetByteArrayRegion(env, jclass_name, 0, strlen(class_name), (jbyte*)class_name);
 		}else{
 			goto DEALLOCATE;
 		}
 		if(agent_options){
 			joptions = (*env)->NewByteArray(env, strlen(agent_options));
-			(*env)->SetByteArrayRegion(env, joptions, 0, strlen(agent_options), agent_options);
+			(*env)->SetByteArrayRegion(env, joptions, 0, strlen(agent_options), (jbyte*)agent_options);
 		}
 		
 		(*env)->CallObjectMethod(env, *(gdata->inst), *(gdata->premain_method), jclass_name,
joptions);
@@ -208,7 +208,7 @@
 	size = zipEntry.uncompressedSize;
 	result = (char *)hymem_allocate_memory(size*sizeof(char));
 #ifndef HY_ZIP_API
-	retval = zip_getZipEntryData(privatePortLibrary, &zipFile, &zipEntry, result, size);
+	retval = zip_getZipEntryData(privatePortLibrary, &zipFile, &zipEntry, (unsigned
char*)result, size);
 #else /* HY_ZIP_API */
 	retval = zipFuncs->zip_getZipEntryData(VMI, &zipFile, &zipEntry, result, size);
 #endif /* HY_ZIP_API */

Modified: harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/shared/instrument.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/shared/instrument.c?rev=681009&r1=681008&r2=681009&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/shared/instrument.c
(original)
+++ harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/shared/instrument.c
Wed Jul 30 06:24:28 2008
@@ -252,7 +252,7 @@
             
 		  //construct a jvmtiClassDefinition element		  
 		  class_definitions[index].klass=klass;
-		  class_definitions[index].class_bytes=class_bytes;
+		  class_definitions[index].class_bytes=(unsigned char*)class_bytes;
 		  class_definitions[index].class_byte_count=class_byte_count;
 	  }
 

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/libhlp.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/libhlp.c?rev=681009&r1=681008&r2=681009&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/libhlp.c
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/libhlp.c
Wed Jul 30 06:24:28 2008
@@ -28,7 +28,7 @@
 {
 
   /* append a separator, first */
-  if (*classPath && (*classPath)->data[strlen ((*classPath)->data)] != sep)
+  if (*classPath && (*classPath)->data[strlen ((char *)((*classPath)->data))]
!= sep)
     {
       char separator[2];
       separator[0] = (char) sep;
@@ -65,8 +65,8 @@
           if (*classPath == NULL)
             return -1;
           hysysinfo_get_env (envvar,
-                             (*classPath)->data + strlen ((*classPath)->data),
-                             rc);
+                             (char *)((*classPath)->data) + strlen ((char *)((*classPath)->data)),
+                             (U_32)rc);
           (*classPath)->remaining -= rc;
           break;
         }
@@ -266,7 +266,7 @@
   if (((*env)->ExceptionCheck (env)))
     return 1;
 
-  (*env)->SetByteArrayRegion (env, bytearray, (UDATA) 0, strLength, chars);
+  (*env)->SetByteArrayRegion (env, bytearray, (UDATA) 0, strLength, (jbyte*)chars);
 
   string =
     (*env)->NewObject (env, stringClass, stringMid, bytearray, (UDATA) 0,

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/main.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/main.c?rev=681009&r1=681008&r2=681009&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/main.c (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/main.c Wed
Jul 30 06:24:28 2008
@@ -941,7 +941,7 @@
        }
 
        /* FIXME: buffer leak ignored */
-       options[j].optionString = lineBuf->data; 
+       options[j].optionString = (char *)(lineBuf->data); 
        options[j].extraInfo = NULL;
        ++j;
    }
@@ -989,7 +989,7 @@
   /* Check that the minimum required -D options have been included.  If not, calculate and
add the defaults */
   initDefaultDefines (portLibrary, (void **)&options, argc, argv,
                       isStandaloneJar ? classArg : 0, &classPath2, &javaHome,
-                      &javaLibraryPath, vmdllsubdir, &j);
+                      &javaLibraryPath, vmdllsubdir, (int *) &j);
 
   // Slam in the pointer to the HyPortLibrary
   portLibOptionStr = hymem_allocate_memory (strlen(PORT_LIB_OPTION) + 1);

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/strbuf.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/strbuf.c?rev=681009&r1=681008&r2=681009&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/strbuf.c
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/strbuf.c
Wed Jul 30 06:24:28 2008
@@ -30,7 +30,7 @@
   buffer = strBufferEnsure (portLibrary, buffer, len);
   if (buffer)
     {
-      strcat (buffer->data, string);
+      strcat ((char *)(buffer->data), string);
       buffer->remaining -= len;
     }
 
@@ -60,12 +60,12 @@
       PORT_ACCESS_FROM_PORT (portLibrary);
       UDATA newSize = len > MIN_GROWTH ? len : MIN_GROWTH;
       HyStringBuffer *new =
-        hymem_allocate_memory (strlen (buffer->data) + newSize +
+        hymem_allocate_memory (strlen ((char *)(buffer->data)) + newSize +
                                sizeof (UDATA) + 1);
       if (new)
         {
           new->remaining = newSize;
-          strcpy (new->data, buffer->data);
+          strcpy ((char *)(new->data), (char *)(buffer->data));
         }
       hymem_free_memory (buffer);
       return new;
@@ -83,8 +83,8 @@
   buffer = strBufferEnsure (portLibrary, buffer, len);
   if (buffer)
     {
-      memmove (buffer->data + len, buffer->data, strlen (buffer->data) + 1);
-      strncpy (buffer->data, string, len);
+      memmove (buffer->data + len, buffer->data, strlen ((char *)(buffer->data))
+ 1);
+      strncpy ((char *)(buffer->data), string, len);
       buffer->remaining -= len;
     }
 
@@ -94,5 +94,5 @@
 char *
 strBufferData (HyStringBuffer * buffer)
 {
-  return buffer ? buffer->data : NULL;
+  return buffer ? (char *)(buffer->data) : NULL;
 }

Modified: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/common/shared/iohelp.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/common/shared/iohelp.c?rev=681009&r1=681008&r2=681009&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/common/shared/iohelp.c
(original)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/common/shared/iohelp.c
Wed Jul 30 06:24:28 2008
@@ -27,7 +27,7 @@
 ioh_convertToPlatform (char *path)
 {
   char *pathIndex;
-  int length = strlen (path);
+  size_t length = strlen (path);
 
   /* Convert all separators to the same type */
   pathIndex = path;
@@ -49,20 +49,20 @@
     {
       pathIndex++;
     }
-  if ((pathIndex > path) && (length > (pathIndex - path))
+  if ((pathIndex > path) && ((int)length > (pathIndex - path))
       && (*(pathIndex + 1) == ':'))
     {
       /* For Example '////c:/!*' (! added to avoid gcc warning) */
-      int newlen = length - (pathIndex - path);
+      size_t newlen = length - (pathIndex - path);
       memmove (path, pathIndex, newlen);
       path[newlen] = '\0';
     }
   else
     {
-      if ((pathIndex - path > 3) && (length > (pathIndex - path)))
+      if ((pathIndex - path > 3) && ((int)length > (pathIndex - path)))
         {
           /* For Example '////serverName/!*' (! added to avoid gcc warning) */
-          int newlen = length - (pathIndex - path) + 2;
+          size_t newlen = length - (pathIndex - path) + 2;
           memmove (path, pathIndex - 2, newlen);
           path[newlen] = '\0';
         }

Modified: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/common/shared/strhelp.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/common/shared/strhelp.c?rev=681009&r1=681008&r2=681009&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/common/shared/strhelp.c
(original)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/common/shared/strhelp.c
Wed Jul 30 06:24:28 2008
@@ -45,7 +45,7 @@
         char *chunk = va_arg (argp, char *);
         if (chunk)
         {
-            concatenatedSize += strlen (chunk);
+            concatenatedSize += (UDATA)strlen (chunk);
         }
         else
         {
@@ -111,8 +111,8 @@
     /* missing delimiter means the whole line is the key and value is empty */
     size_t keyLength = (delim ? delim : end) - start;
     size_t valueLength = delim ? end - delim - 1 : 0;
-    property->key = hymem_allocate_memory (keyLength + 1);
-    property->value = hymem_allocate_memory (valueLength + 1);
+    property->key = hymem_allocate_memory ((UDATA)(keyLength + 1));
+    property->value = hymem_allocate_memory ((UDATA)(valueLength + 1));
     if (!property->key || !property->value)
     {
         return 0;

Modified: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/shared/hynls.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/shared/hynls.c?rev=681009&r1=681008&r2=681009&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/shared/hynls.c (original)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/shared/hynls.c Wed
Jul 30 06:24:28 2008
@@ -781,7 +781,7 @@
                                 {
                                   charPointer = dataBuf;
                                   endPointer =
-                                    charPointer + strlen (charPointer);
+                                    charPointer + strlen ((char *)charPointer);
                                 }
                             }
                           if (charPointer >= endPointer)
@@ -869,7 +869,7 @@
                            BUF_SIZE) != NULL)
                         {
                           charPointer = dataBuf;
-                          endPointer = charPointer + strlen (charPointer);
+                          endPointer = charPointer + strlen ((char *)charPointer);
                         }
                     }
                   if (charPointer >= endPointer)

Modified: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/shared/hystr.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/shared/hystr.c?rev=681009&r1=681008&r2=681009&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/shared/hystr.c (original)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/shared/hystr.c Wed
Jul 30 06:24:28 2008
@@ -1071,7 +1071,7 @@
       currentU16 = value;
       while (numberOfUnicodeChar-- > 0)
         {
-          buf += encodeUTF8Char ((UDATA) * currentU16++, buf);
+          buf += encodeUTF8Char ((UDATA) * currentU16++, (U_8 *)buf);
         }
     }
   bufLen -= numberOfUTF8Char;

Modified: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hyfiletext.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hyfiletext.c?rev=681009&r1=681008&r2=681009&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hyfiletext.c
(original)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hyfiletext.c
Wed Jul 30 06:24:28 2008
@@ -292,7 +292,7 @@
           int wcresult;
           numberU8Consumed = decodeUTF8Char (cursor, &unicode);
           cursor += numberU8Consumed;
-          wcresult = wctomb (out, (wchar_t) unicode);
+          wcresult = wctomb ((char *) out, (wchar_t) unicode);
           if (wcresult == -1)
             {
               *out++ = '?';
@@ -331,7 +331,7 @@
         }
       if (newBuf)
         {
-          translateUTF8String (buf, newBuf, nbytes);
+          translateUTF8String ((const U_8*)buf, (U_8 *)newBuf, nbytes);
           buf = newBuf;
           nbytes = newLength;
         }
@@ -361,7 +361,7 @@
         outBuf = portLibrary->mem_allocate_memory (portLibrary, newLength + 1);
         if (outBuf)
         {
-            translateUTF8String (buf, outBuf, nbytes);
+            translateUTF8String ((const U_8 *)buf, (U_8 *) outBuf, nbytes);
             nbytes = newLength;
             outBuf[nbytes] = '\0';
         } else

Modified: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hysock.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hysock.c?rev=681009&r1=681008&r2=681009&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hysock.c (original)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hysock.c Wed
Jul 30 06:24:28 2008
@@ -5206,7 +5206,7 @@
                 {
                   /* ok we have more work to do to figure it out */
                   if (getsockopt (SOCKET_CAST(sock), SOL_SOCKET, SO_ERROR,
-                                  (char *) &errorVal, &errorValLen) >= 0) {
+                                  (char *) &errorVal, (unsigned int *)&errorValLen)
>= 0) {
                       return errorVal ? findError(errorVal):0; 
                   } else {
                       rc = errno;
@@ -5220,7 +5220,7 @@
           /* if the descriptor is in the exception set then the connect failed */
           if (my_pollfd.revents & (POLLERR | POLLHUP | POLLNVAL)) {
               if (getsockopt(SOCKET_CAST(sock), SOL_SOCKET, SO_ERROR,
-                             (char *) &errorVal, &errorValLen) >= 0) {
+                             (char *) &errorVal, (unsigned int *)&errorValLen) >=
0) {
                   return errorVal ? findError(errorVal):0; 
               }
               rc = errno;

Modified: harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_common.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_common.h?rev=681009&r1=681008&r2=681009&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_common.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_common.h Wed Jul 30 06:24:28 2008
@@ -312,7 +312,7 @@
 
 inline Partial_Reveal_Object* obj_get_next_obj_from_vt(Partial_Reveal_Object* p_obj)
 {
-  return (Partial_Reveal_Object*)((VT_SIZE_INT)(POINTER_SIZE_INT)p_obj + (VT_SIZE_INT)obj_get_vt_raw(p_obj));
+  return (Partial_Reveal_Object*)((POINTER_SIZE_INT)p_obj + (POINTER_SIZE_INT)(VT_SIZE_INT)obj_get_vt_raw(p_obj));
 }
 
 /********************* for concurrent GC *******************************/



Mime
View raw message