changeset 3887:5c61c31d2621

6989760: cmm native compiler warnings Reviewed-by: prr, ohair
author bae
date Wed, 16 Mar 2011 19:21:06 +0300
parents 253f3bc64961
children 4450c35a5f90
files make/sun/cmm/kcms/Makefile src/share/native/sun/awt/image/jpeg/imageioJPEG.c
diffstat 2 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/make/sun/cmm/kcms/Makefile	Tue Mar 15 17:05:02 2011 -0400
+++ b/make/sun/cmm/kcms/Makefile	Wed Mar 16 19:21:06 2011 +0300
@@ -72,7 +72,8 @@
 # Extra rules
 #
 ifeq  ($(PLATFORM), linux)
-LDLIBS += -lpthread
+    LDLIBS += -lpthread
+    OTHER_CFLAGS += -Wno-missing-field-initializers
 endif
 
 clean clobber:: 
@@ -104,6 +105,5 @@
 
 endif # PLATFORM
 
-#CFLAGS += -DJAVACMM -DFUT_CALC_EX -DNO_FUT_GCONST
-CFLAGS += -DFUT_CALC_EX -DNO_FUT_GCONST
+CFLAGS += -DJAVACMM -DFUT_CALC_EX -DNO_FUT_GCONST
 
--- a/src/share/native/sun/awt/image/jpeg/imageioJPEG.c	Tue Mar 15 17:05:02 2011 -0400
+++ b/src/share/native/sun/awt/image/jpeg/imageioJPEG.c	Wed Mar 16 19:21:06 2011 +0300
@@ -40,7 +40,7 @@
 #include <setjmp.h>
 #include <assert.h>
 #include <string.h>
-
+#include <limits.h>
 
 /* java native interface headers */
 #include "jni.h"
@@ -2657,7 +2657,7 @@
         (destWidth < 0) || (destWidth > srcWidth) ||
         (destHeight < 0) ||
         (stepX < 0) || (stepY < 0) ||
-        ((scanLineSize / numBands) < destWidth))  /* destWidth causes an integer overflow */
+        ((INT_MAX / numBands) < destWidth))  /* destWidth causes an integer overflow */
     {
         JNU_ThrowByName(env, "javax/imageio/IIOException",
                         "Invalid argument to native writeImage");