Index: /trunk/openjdk/jdk/make/sun/jpeg/Makefile
===================================================================
--- /trunk/openjdk/jdk/make/sun/jpeg/Makefile	(revision 333)
+++ /trunk/openjdk/jdk/make/sun/jpeg/Makefile	(revision 334)
@@ -32,4 +32,6 @@
 ifeq ($(PLATFORM), os2)
 LIBRARY_SHORT = jjpeg
+# jpeg code uses potentially unsafe setjmp/longjmp
+CFLAGS_COMMON += -Wno-clobbered
 endif
 
Index: /trunk/openjdk/jdk/make/sun/splashscreen/Makefile
===================================================================
--- /trunk/openjdk/jdk/make/sun/splashscreen/Makefile	(revision 333)
+++ /trunk/openjdk/jdk/make/sun/splashscreen/Makefile	(revision 334)
@@ -32,4 +32,6 @@
 ifeq ($(PLATFORM), os2)
 LIBRARY_SHORT = jsplash
+# jpeg code uses potentially unsafe setjmp/longjmp
+CFLAGS_COMMON += -Wno-clobbered
 endif
 
Index: /trunk/openjdk/jdk/src/os2/native/sun/font/fontpath_os2.c
===================================================================
--- /trunk/openjdk/jdk/src/os2/native/sun/font/fontpath_os2.c	(revision 333)
+++ /trunk/openjdk/jdk/src/os2/native/sun/font/fontpath_os2.c	(revision 334)
@@ -26,5 +26,4 @@
  */
 
-#define OS2EMX_PLAIN_CHAR
 #define INCL_WINSHELLDATA
 #include <os2wrap.h> // Odin32 OS/2 api wrappers
Index: /trunk/openjdk/jdk/src/share/back/ArrayTypeImpl.c
===================================================================
--- /trunk/openjdk/jdk/src/share/back/ArrayTypeImpl.c	(revision 333)
+++ /trunk/openjdk/jdk/src/share/back/ArrayTypeImpl.c	(revision 334)
@@ -113,5 +113,5 @@
 
         jarray array;
-        jclass componentClass;
+        jclass componentClass = NULL;
         jdwpError serror;
 
Index: /trunk/openjdk/jdk/src/share/demo/jvmti/compiledMethodLoad/compiledMethodLoad.c
===================================================================
--- /trunk/openjdk/jdk/src/share/demo/jvmti/compiledMethodLoad/compiledMethodLoad.c	(revision 333)
+++ /trunk/openjdk/jdk/src/share/demo/jvmti/compiledMethodLoad/compiledMethodLoad.c	(revision 334)
@@ -135,5 +135,5 @@
         for (i = 0; i < numpcs; i++) {
             PCStackInfo pcrecord = (record->pcinfo[i]);
-            fprintf(fp, "PcDescriptor(pc=0x%lx):\n", (jint)(pcrecord.pc));
+            fprintf(fp, "PcDescriptor(pc=0x%x):\n", (jint)(pcrecord.pc));
             print_stack_frames(&pcrecord, jvmti, fp);
         }
Index: /trunk/openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/coding.cpp
===================================================================
--- /trunk/openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/coding.cpp	(revision 333)
+++ /trunk/openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/coding.cpp	(revision 334)
@@ -500,4 +500,7 @@
     assert(B == 1 && H == 256 && S == 0 && D == 0);
     return getPopValue(this, *rp++ & 0xFF);
+
+  default:
+    break;
   }
   assert(false);
@@ -729,4 +732,5 @@
         case cmk_BHS0:   cmk2 = cmk_pop_BHS0;   break;
         case cmk_BYTE1:  cmk2 = cmk_pop_BYTE1;  break;
+        default: break;
         }
         self->vs0.cmk = cmk2;
Index: /trunk/openjdk/jdk/src/share/native/com/sun/tools/jdi/SharedMemoryConnection.c
===================================================================
--- /trunk/openjdk/jdk/src/share/native/com/sun/tools/jdi/SharedMemoryConnection.c	(revision 333)
+++ /trunk/openjdk/jdk/src/share/native/com/sun/tools/jdi/SharedMemoryConnection.c	(revision 334)
@@ -174,5 +174,5 @@
      * Get the packet header
      */
-    (*env)->GetByteArrayRegion(env, b, 0, sizeof(pktHeader), pktHeader);
+    (*env)->GetByteArrayRegion(env, b, 0, sizeof(pktHeader), (jbyte *)pktHeader);
 
     total_length = (int)pktHeader[3] | ((int)pktHeader[2] << 8) |
Index: /trunk/openjdk/jdk/src/share/native/sun/awt/libpng/png.c
===================================================================
--- /trunk/openjdk/jdk/src/share/native/sun/awt/libpng/png.c	(revision 333)
+++ /trunk/openjdk/jdk/src/share/native/sun/awt/libpng/png.c	(revision 334)
@@ -734,10 +734,9 @@
 png_get_copyright(png_structp png_ptr)
 {
-   if (&png_ptr != NULL)  /* silence compiler warning about unused png_ptr */
+   png_ptr = png_ptr;  /* silence compiler warning about unused png_ptr */
    return ((png_charp) "\n libpng version 1.2.18 - May 15, 2007\n\
    Copyright (c) 1998-2007 Glenn Randers-Pehrson\n\
    Copyright (c) 1996-1997 Andreas Dilger\n\
    Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.\n");
-   return ((png_charp) "");
 }
 
@@ -754,7 +753,6 @@
 {
    /* Version of *.c files used when building libpng */
-   if (&png_ptr != NULL)  /* silence compiler warning about unused png_ptr */
-      return ((png_charp) PNG_LIBPNG_VER_STRING);
-   return ((png_charp) "");
+   png_ptr = png_ptr;  /* silence compiler warning about unused png_ptr */
+   return ((png_charp) PNG_LIBPNG_VER_STRING);
 }
 
@@ -763,7 +761,6 @@
 {
    /* Version of *.h files used when building libpng */
-   if (&png_ptr != NULL)  /* silence compiler warning about unused png_ptr */
-      return ((png_charp) PNG_LIBPNG_VER_STRING);
-   return ((png_charp) "");
+   png_ptr = png_ptr;  /* silence compiler warning about unused png_ptr */
+   return ((png_charp) PNG_LIBPNG_VER_STRING);
 }
 
@@ -772,7 +769,6 @@
 {
    /* Returns longer string containing both version and date */
-   if (&png_ptr != NULL)  /* silence compiler warning about unused png_ptr */
-      return ((png_charp) PNG_HEADER_VERSION_STRING);
-   return ((png_charp) "");
+   png_ptr = png_ptr;  /* silence compiler warning about unused png_ptr */
+   return ((png_charp) PNG_HEADER_VERSION_STRING);
 }
 
Index: /trunk/openjdk/jdk/src/share/native/sun/awt/libpng/pngrtran.c
===================================================================
--- /trunk/openjdk/jdk/src/share/native/sun/awt/libpng/pngrtran.c	(revision 333)
+++ /trunk/openjdk/jdk/src/share/native/sun/awt/libpng/pngrtran.c	(revision 334)
@@ -3994,5 +3994,5 @@
 #ifdef PNG_FLOATING_POINT_SUPPORTED
 #if defined(PNG_READ_GAMMA_SUPPORTED)
-const static int png_gamma_shift[] =
+static const int png_gamma_shift[] =
    {0x10, 0x21, 0x42, 0x84, 0x110, 0x248, 0x550, 0xff0, 0x00};
 
Index: /trunk/openjdk/jdk/src/share/native/sun/awt/libpng/pngrutil.c
===================================================================
--- /trunk/openjdk/jdk/src/share/native/sun/awt/libpng/pngrutil.c	(revision 333)
+++ /trunk/openjdk/jdk/src/share/native/sun/awt/libpng/pngrutil.c	(revision 334)
@@ -210,5 +210,5 @@
                               png_size_t prefix_size, png_size_t *newlength)
 {
-   const static char msg[] = "Error decoding compressed text";
+   static const char msg[] = "Error decoding compressed text";
    png_charp text;
    png_size_t text_size;
@@ -592,6 +592,6 @@
    png_crc_finish(png_ptr, length);
 
-   if (&info_ptr == NULL) /* quiet compiler warnings about unused info_ptr */
-      return;
+   info_ptr = info_ptr; /* quiet compiler warnings about unused info_ptr */
+   return;
 }
 
Index: /trunk/openjdk/jdk/src/share/native/sun/font/bidi/uchardir.c
===================================================================
--- /trunk/openjdk/jdk/src/share/native/sun/font/bidi/uchardir.c	(revision 333)
+++ /trunk/openjdk/jdk/src/share/native/sun/font/bidi/uchardir.c	(revision 334)
@@ -615,5 +615,6 @@
   dc &= 0x0f;
   if (dc > 13) {
-    dc = x2i[cp - 0x202a];
+    if (cp >= 0x202a && cp < 0x202a + 5)
+      dc = x2i[cp - 0x202a];
   } else {
     dc = jx2i[dc];
Index: /trunk/openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/LCMS.c
===================================================================
--- /trunk/openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/LCMS.c	(revision 333)
+++ /trunk/openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/LCMS.c	(revision 334)
@@ -181,5 +181,5 @@
     }
 
-    sTrans.xf = cmsCreateMultiprofileTransform(iccArray, j,
+    sTrans.xf = cmsCreateMultiprofileTransform((cmsHPROFILE *)iccArray, j,
         0, 0, renderType, 0);
 
@@ -573,5 +573,5 @@
     int i, idx, delta, count;
     LPBYTE padChars[3] = {0, 0, 0};
-    LPBYTE beforeBuf, afterBuf, ptr;
+    LPBYTE beforeBuf = 0, afterBuf = 0, ptr;
     size_t beforeSize, afterSize;
     icUInt32Number profileSize, temp;
Index: /trunk/openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/cmsio1.c
===================================================================
--- /trunk/openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/cmsio1.c	(revision 333)
+++ /trunk/openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/cmsio1.c	(revision 334)
@@ -53,4 +53,10 @@
 
 
+#ifdef __EMX__
+#include <unistd.h>
+#include <stdlib.h>
+#define swab _swab
+#endif
+
 #include "lcms.h"
 
Index: /trunk/openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/cmslut.c
===================================================================
--- /trunk/openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/cmslut.c	(revision 333)
+++ /trunk/openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/cmslut.c	(revision 334)
@@ -791,5 +791,5 @@
     MAT3       Jacobian;
     WORD       FixedK;
-    WORD       LastResult[4];
+    WORD       LastResult[4] = {0};
 
 
Index: /trunk/openjdk/jdk/src/share/transport/shmem/shmemBase.c
===================================================================
--- /trunk/openjdk/jdk/src/share/transport/shmem/shmemBase.c	(revision 333)
+++ /trunk/openjdk/jdk/src/share/transport/shmem/shmemBase.c	(revision 334)
@@ -540,7 +540,7 @@
     }
 
-    sprintf(connection->name, "%s.%ld", transport->name, sysProcessGetID());
+    sprintf(connection->name, "%s.%lld", transport->name, sysProcessGetID());
     error = sysSharedMemOpen(connection->name, &connection->sharedMemory,
-                             &connection->shared);
+                             (void **)&connection->shared);
     if (error != SYS_OK) {
         closeConnection(connection);
@@ -604,7 +604,7 @@
     }
 
-    sprintf(connection->name, "%s.%ld", transport->name, otherPID);
+    sprintf(connection->name, "%s.%lld", transport->name, otherPID);
     error = sysSharedMemCreate(connection->name, sizeof(SharedMemory),
-                               &connection->sharedMemory, &connection->shared);
+                               &connection->sharedMemory, (void **)&connection->shared);
     if (error != SYS_OK) {
         closeConnection(connection);
@@ -705,5 +705,5 @@
     }
 
-    error = sysSharedMemOpen(address, &transport->sharedMemory, &transport->shared);
+    error = sysSharedMemOpen(address, &transport->sharedMemory, (void **)&transport->shared);
     if (error != SYS_OK) {
         setLastError(error);
@@ -772,5 +772,5 @@
         strcpy(transport->name, address);
         error = sysSharedMemCreate(address, sizeof(SharedListener),
-                                   &transport->sharedMemory, &transport->shared);
+                                   &transport->sharedMemory, (void **)&transport->shared);
     }
     if (error != SYS_OK) {
@@ -833,5 +833,5 @@
 {
     jint error;
-    SharedMemoryConnection *connection;
+    SharedMemoryConnection *connection = NULL;
 
     clearLastError();
Index: /trunk/openjdk/jdk/src/windows/native/com/sun/security/auth/module/nt.c
===================================================================
--- /trunk/openjdk/jdk/src/windows/native/com/sun/security/auth/module/nt.c	(revision 333)
+++ /trunk/openjdk/jdk/src/windows/native/com/sun/security/auth/module/nt.c	(revision 334)
@@ -288,5 +288,5 @@
                         tokenHandle) == 0) {
         if (debug) {
-            printf("  [getToken] OpenThreadToken error [%d]: ", GetLastError());
+            printf("  [getToken] OpenThreadToken error [%ld]: ", GetLastError());
             DisplayErrorText(GetLastError());
         }
@@ -297,5 +297,5 @@
                         tokenHandle) == 0) {
             if (debug) {
-                printf("  [getToken] OpenProcessToken error [%d]: ",
+                printf("  [getToken] OpenProcessToken error [%ld]: ",
                         GetLastError());
                 DisplayErrorText(GetLastError());
@@ -339,5 +339,5 @@
                         &retBufSize) == 0) {
         if (debug) {
-            printf("  [getUser] GetTokenInformation error [%d]: ",
+            printf("  [getUser] GetTokenInformation error [%ld]: ",
                 GetLastError());
             DisplayErrorText(GetLastError());
@@ -372,5 +372,5 @@
                 &nameUse) == 0) {
         if (debug) {
-            printf("  [getUser] LookupAccountSid error [%d]: ",
+            printf("  [getUser] LookupAccountSid error [%ld]: ",
                 GetLastError());
             DisplayErrorText(GetLastError());
@@ -414,5 +414,5 @@
                 &nameUse) == 0) {
         if (debug) {
-            printf("  [getUser] LookupAccountName error [%d]: ",
+            printf("  [getUser] LookupAccountName error [%ld]: ",
                 GetLastError());
             DisplayErrorText(GetLastError());
@@ -469,5 +469,5 @@
                         &retBufSize) == 0) {
         if (debug) {
-            printf("  [getPrimaryGroup] GetTokenInformation error [%d]: ",
+            printf("  [getPrimaryGroup] GetTokenInformation error [%ld]: ",
                 GetLastError());
             DisplayErrorText(GetLastError());
@@ -522,5 +522,5 @@
                         &retBufSize) == 0) {
         if (debug) {
-            printf("  [getGroups] GetTokenInformation error [%d]: ",
+            printf("  [getGroups] GetTokenInformation error [%ld]: ",
                 GetLastError());
             DisplayErrorText(GetLastError());
@@ -549,5 +549,5 @@
         getTextualSid(tokenGroupInfo->Groups[i].Sid, (*groups)[i], &bufSize);
         if (debug) {
-            printf("  [getGroups] group %d: %s\n", i, (*groups)[i]);
+            printf("  [getGroups] group %ld: %s\n", i, (*groups)[i]);
         }
     }
@@ -576,5 +576,5 @@
             if (debug) {
                 printf
-                    ("  [getImpersonationToken] OpenProcessToken error [%d]: ",
+                    ("  [getImpersonationToken] OpenProcessToken error [%ld]: ",
                     GetLastError());
                 DisplayErrorText(GetLastError());
@@ -588,5 +588,5 @@
                         impersonationToken) == 0) {
         if (debug) {
-            printf("  [getImpersonationToken] DuplicateToken error [%d]: ",
+            printf("  [getImpersonationToken] DuplicateToken error [%ld]: ",
                 GetLastError());
             DisplayErrorText(GetLastError());
@@ -596,5 +596,5 @@
 
     if (debug) {
-        printf("  [getImpersonationToken] token = %d\n", *impersonationToken);
+        printf("  [getImpersonationToken] token = %ld\n", *impersonationToken);
     }
     return TRUE;
Index: /trunk/openjdk/jdk/src/windows/native/sun/font/fontpath.c
===================================================================
--- /trunk/openjdk/jdk/src/windows/native/sun/font/fontpath.c	(revision 333)
+++ /trunk/openjdk/jdk/src/windows/native/sun/font/fontpath.c	(revision 334)
@@ -190,5 +190,5 @@
     /* printf("FULL=%s\n",lpelfe->elfFullName);fflush(stdout);  */
 
-    fullname = JNU_NewStringPlatform(env, lpelfe->elfFullName);
+    fullname = JNU_NewStringPlatform(env, (char *)lpelfe->elfFullName);
     fullnameLC = (*env)->CallObjectMethod(env, fullname,
                                           fmi->toLowerCaseMID, fmi->locale);
