Changeset 330
- Timestamp:
- Feb 21, 2012, 9:24:37 PM (13 years ago)
- Location:
- trunk/openjdk/jdk
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/openjdk/jdk/make/common/Defs-os2.gmk
r310 r330 125 125 # We compile a lot of MSVC code which seems to silently tolerate this 126 126 GCC_WARNINGS += -Wno-sign-compare 127 GCC_WARNINGS_C += -Wno-pointer-to-int-cast -Wno-int-to-pointer-cast 127 GCC_WARNINGS_C += -Wno-pointer-to-int-cast -Wno-int-to-pointer-cast -Wno-missing-field-initializers 128 128 GCC_WARNINGS_CXX += -Wno-write-strings 129 129 -
trunk/openjdk/jdk/src/windows/native/java/io/Win32FileSystem_md.c
r278 r330 178 178 { 179 179 jboolean rv = JNI_FALSE; 180 int mode ;180 int mode = 0; 181 181 switch (a) { 182 182 case java_io_FileSystem_ACCESS_READ: … … 346 346 jobject file) 347 347 { 348 DIR *dir ;348 DIR *dir = NULL; 349 349 struct dirent *ptr; 350 350 int len, maxlen; -
trunk/openjdk/jdk/src/windows/native/java/io/WinNTFileSystem_md.c
r278 r330 240 240 { 241 241 jboolean rv = JNI_FALSE; 242 int mode ;242 int mode = 0; 243 243 WCHAR *pathbuf = fileToNTPath(env, file, ids.path); 244 244 if (pathbuf == NULL) -
trunk/openjdk/jdk/src/windows/native/java/io/dirent_md.c
r278 r330 32 32 #include <errno.h> 33 33 #include <assert.h> 34 35 #ifdef __WIN32OS2__ 36 #include <string.h> 37 #endif 34 38 35 39 #include "dirent_md.h" -
trunk/openjdk/jdk/src/windows/native/java/io/io_util_md.c
r278 r330 46 46 #endif 47 47 48 externjboolean onNT = JNI_FALSE;48 jboolean onNT = JNI_FALSE; 49 49 50 50 static int MAX_INPUT_EVENTS = 2000; … … 339 339 } 340 340 341 if (! PeekNamedPipe(han, NULL, 0, NULL, pbytes, NULL)) {341 if (! PeekNamedPipe(han, NULL, 0, NULL, (LPDWORD)pbytes, NULL)) { 342 342 /* PeekNamedPipe fails when at EOF. In that case we 343 343 * simply make *pbytes = 0 which is consistent with the … … 535 535 HANDLE h = (HANDLE)fd; 536 536 537 if ( fd== INVALID_HANDLE_VALUE) {537 if (h == INVALID_HANDLE_VALUE) { 538 538 return 0; 539 539 } -
trunk/openjdk/jdk/src/windows/native/java/lang/ProcessEnvironment_md.c
r278 r330 52 52 if ((bytes = (*env)->NewByteArray(env, i)) == NULL) return NULL; 53 53 (*env)->SetByteArrayRegion(env, bytes, 0, i, blockA); 54 FreeEnvironmentStringsA( blockA);54 FreeEnvironmentStringsA((LPSTR)blockA); 55 55 return (*env)->NewObject(env, JNU_ClassString(env), 56 56 String_init_ID, bytes); … … 74 74 75 75 envblock = (*env)->NewString(env, blockW, i); 76 FreeEnvironmentStringsW( blockW);76 FreeEnvironmentStringsW((LPWSTR)blockW); 77 77 return envblock; 78 78 } -
trunk/openjdk/jdk/src/windows/native/java/lang/ProcessImpl_md.c
r278 r330 34 34 #include <io.h> 35 35 36 #ifdef __WIN32OS2__ 37 #include <string.h> 38 #endif 39 36 40 #define PIPE_SIZE 4096 37 41 -
trunk/openjdk/jdk/src/windows/native/java/lang/java_props_md.c
r278 r330 41 41 #include "java_props.h" 42 42 43 #ifdef __ EMX__43 #ifdef __GNUC__ 44 44 #define boolean int 45 45 #endif -
trunk/openjdk/jdk/src/windows/native/java/util/TimeZone_md.c
r278 r330 28 28 #include <stdlib.h> 29 29 #include "TimeZone_md.h" 30 31 #ifdef __EMX__ 30 #include "jvm.h" 31 32 #ifdef __GNUC__ 32 33 #include <wchar.h> 33 34 #include <string.h> … … 110 111 valSize = sizeof(val); 111 112 ret = RegQueryValueExA(hKey, (char *) keyNames[keyIndex + 1], NULL, 112 typePtr, val, &valSize);113 typePtr, (LPBYTE) val, &valSize); 113 114 if (ret != ERROR_SUCCESS) { 114 115 return ret; … … 142 143 } 143 144 if (gmtOffset != 0) { 144 sprintf(buffer, "GMT%c%02 d:%02d",145 sprintf(buffer, "GMT%c%02ld:%02ld", 145 146 ((sign >= 0) ? '+' : '-'), 146 147 gmtOffset / 60, … … 293 294 size = sizeof(szValue); 294 295 ret = getValueInRegistry(hSubKey, STD_NAME, &valueType, 295 szValue, &size);296 (LPBYTE) szValue, &size); 296 297 if (ret != ERROR_SUCCESS) { 297 298 /* … … 352 353 */ 353 354 valueSize = MAX_MAPID_LENGTH; 354 ret = RegQueryValueExA(hSubKey, "MapID", NULL, &valueType, winMapID, &valueSize);355 ret = RegQueryValueExA(hSubKey, "MapID", NULL, &valueType, (LPBYTE)winMapID, &valueSize); 355 356 (void) RegCloseKey(hSubKey); 356 357 (void) RegCloseKey(hKey); -
trunk/openjdk/jdk/src/windows/native/java/util/WindowsPreferences.c
r278 r330 105 105 buffer = (char*)malloc(valueSize); 106 106 107 if (RegQueryValueEx((HKEY)hKey, valueNameStr, NULL, &valueType, buffer,107 if (RegQueryValueEx((HKEY)hKey, valueNameStr, NULL, &valueType, (LPBYTE)buffer, 108 108 &valueSize) != ERROR_SUCCESS) { 109 109 free(buffer); … … 138 138 valueNameStr = (*env)->GetByteArrayElements(env, valueName, NULL); 139 139 error_code = RegSetValueEx((HKEY)hKey, valueNameStr, 0, 140 REG_SZ, dataStr, size);140 REG_SZ, (LPBYTE)dataStr, size); 141 141 (*env)->ReleaseByteArrayElements(env, data, dataStr, 0); 142 142 (*env)->ReleaseByteArrayElements(env, valueName, valueNameStr, 0); … … 165 165 int errorCode = -1; 166 166 errorCode = RegQueryInfoKey((HKEY)hKey, NULL, NULL, NULL, 167 &subKeysNumber,&maxSubKeyLength, NULL,168 &valuesNumber,&maxValueNameLength,167 (LPDWORD)&subKeysNumber, (LPDWORD)&maxSubKeyLength, NULL, 168 (LPDWORD)&valuesNumber, (LPDWORD)&maxValueNameLength, 169 169 NULL, NULL, NULL); 170 170 tmp[0]= subKeysNumber; … … 184 184 char* buffer = NULL; 185 185 buffer = (char*)malloc(maxKeyLength); 186 if (RegEnumKeyEx((HKEY) hKey, subKeyIndex, buffer, &size, NULL, NULL,186 if (RegEnumKeyEx((HKEY) hKey, subKeyIndex, buffer, (LPDWORD)&size, NULL, NULL, 187 187 NULL, NULL) != ERROR_SUCCESS){ 188 188 free(buffer); … … 203 203 buffer = (char*)malloc(maxValueNameLength); 204 204 error_code = RegEnumValue((HKEY) hKey, valueIndex, buffer, 205 &size, NULL, NULL, NULL, NULL);205 (LPDWORD)&size, NULL, NULL, NULL, NULL); 206 206 if (error_code!= ERROR_SUCCESS){ 207 207 free(buffer); -
trunk/openjdk/jdk/src/windows/native/sun/security/provider/WinCAPISeedGenerator.c
r278 r330 85 85 numBytes = (*env)->GetArrayLength(env, randArray); 86 86 randBytes = (*env)->GetByteArrayElements(env, randArray, NULL); 87 if (genRandom(hCryptProv, numBytes, randBytes)) {87 if (genRandom(hCryptProv, numBytes, (BYTE*)randBytes)) { 88 88 result = JNI_TRUE; 89 89 }
Note:
See TracChangeset
for help on using the changeset viewer.