United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-6725625 : Compiler warnings in awt code

Details
Type:
Bug
Submit Date:
2008-07-14
Status:
Closed
Updated Date:
2011-05-18
Project Name:
JDK
Resolved Date:
2011-05-18
Component:
client-libs
OS:
generic
Sub-Component:
java.awt
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:

Related Reports
Relates:
Relates:
Relates:
Relates:

Sub Tasks

Description
Scanning the latest jdk7 build logs show quite a few awt warning errors. 455 unique ones as far as I can tell.

cat /java/re/jdk/7/promoted/latest/logs/build-*log | egrep '[/\\]awt[\\/]' all.log | sed -e 's@\\@/@g' -e 's@c:/BUILD_AREA/jdk7/jdk/@@g' -e 's@/BUILD_AREA/jdk7/jdk/@@g' | fgrep -i warning | sed -e 's@^[./]*@@' | sort | uniq > awt.warnings

wc -l awt.warnings
     455 awt.warnings

Attached is awt.warnings, the beginning of the file:

"../../../../src/share/native/sun/awt/medialib/mlib_ImageLookUp_64.c", line 1045: warning: pointer arithmetic overflow detected
"../../../../src/share/native/sun/awt/medialib/mlib_ImageLookUp_64.c", line 564: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpS32S16Func.c", line 172: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpS32S16Func.c", line 223: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpS32S16Func.c", line 224: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpS32S16Func.c", line 274: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpS32S16Func.c", line 275: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpS32S16Func.c", line 276: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpS32S16Func.c", line 277: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpS32S16Func.c", line 466: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpS32S16Func.c", line 467: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpS32S16Func.c", line 468: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpS32U16Func.c", line 173: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpS32U16Func.c", line 225: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpS32U16Func.c", line 226: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpS32U16Func.c", line 277: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpS32U16Func.c", line 278: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpS32U16Func.c", line 279: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpS32U16Func.c", line 280: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpS32U16Func.c", line 470: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpS32U16Func.c", line 471: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpS32U16Func.c", line 472: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32S16Func.c", line 148: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32S16Func.c", line 149: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32S16Func.c", line 223: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32S16Func.c", line 224: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32S16Func.c", line 271: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32S16Func.c", line 272: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32S16Func.c", line 273: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32S16Func.c", line 382: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32S16Func.c", line 383: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32S16Func.c", line 384: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32S16Func.c", line 428: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32S16Func.c", line 429: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32S16Func.c", line 430: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32S16Func.c", line 431: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32S16Func.c", line 482: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32S16Func.c", line 483: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32S16Func.c", line 484: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32S16Func.c", line 485: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32S16Func.c", line 546: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32S16Func.c", line 547: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32S16Func.c", line 548: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32S16Func.c", line 549: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32S16Func.c", line 609: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32S16Func.c", line 610: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32S16Func.c", line 611: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32S16Func.c", line 612: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32S16Func.c", line 670: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32S16Func.c", line 671: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32S16Func.c", line 672: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32S16Func.c", line 84: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32S16Func.c", line 85: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32U16Func.c", line 148: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32U16Func.c", line 149: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32U16Func.c", line 223: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32U16Func.c", line 224: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32U16Func.c", line 271: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32U16Func.c", line 272: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32U16Func.c", line 273: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32U16Func.c", line 382: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32U16Func.c", line 383: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32U16Func.c", line 384: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32U16Func.c", line 428: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32U16Func.c", line 429: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32U16Func.c", line 430: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32U16Func.c", line 431: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32U16Func.c", line 482: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32U16Func.c", line 483: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32U16Func.c", line 484: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32U16Func.c", line 485: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32U16Func.c", line 546: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32U16Func.c", line 547: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32U16Func.c", line 548: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32U16Func.c", line 549: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32U16Func.c", line 609: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32U16Func.c", line 610: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32U16Func.c", line 611: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32U16Func.c", line 612: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32U16Func.c", line 670: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32U16Func.c", line 671: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32U16Func.c", line 672: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32U16Func.c", line 84: warning: pointer arithmetic overflow detected
"../../../../src/solaris/native/sun/awt/medialib/mlib_v_ImageLookUpSIS32U16Func.c", line 85: warning: pointer arithmetic overflow detected
"../../../src/share/native/sun/awt/../java2d/opengl/OGLBlitLoops.c", line 771: warning: empty translation unit
"../../../src/share/native/sun/awt/../java2d/opengl/OGLBufImgOps.c", line 750: warning: empty translation unit
"../../../src/share/native/sun/awt/../java2d/opengl/OGLContext.c", line 986: warning: empty translation unit
"../../../src/share/native/sun/awt/../java2d/opengl/OGLFuncs.c", line 124: warning: empty translation unit
"../../../src/share/native/sun/awt/../java2d/opengl/OGLMaskBlit.c", line 93: warning: empty translation unit
"../../../src/share/native/sun/awt/../java2d/opengl/OGLMaskFill.c", line 163: warning: empty translation unit
"../../../src/share/native/sun/awt/../java2d/opengl/OGLPaints.c", line 923: warning: empty translation unit
"../../../src/share/native/sun/awt/../java2d/opengl/OGLRenderQueue.c", line 762: warning: empty translation unit
"../../../src/share/native/sun/awt/../java2d/opengl/OGLRenderer.c", line 329: warning: empty translation unit
"../../../src/share/native/sun/awt/../java2d/opengl/OGLSurfaceData.c", line 588: warning: empty translation unit
"../../../src/share/native/sun/awt/../java2d/opengl/OGLTextRenderer.c", line 1214: warning: empty translation unit
"../../../src/share/native/sun/awt/../java2d/opengl/OGLVertexCache.c", line 288: warning: empty translation unit
"../../../src/share/native/sun/awt/libpng/pngrtran.c", line 3996: warning: storage class after type is obsolescent
"../../../src/share/native/sun/awt/libpng/pngrutil.c", line 212: warning: storage class after type is obsolescent
"../../../src/share/native/sun/awt/splashscreen/splashscreen_gif.c", line 169: warning: integer overflow detected: op "<<"
"../../../src/share/native/sun/awt/splashscreen/splashscreen_gif.c", line 228: warning: integer overflow detected: op "<<"
"../../../src/solaris/native/sun/awt/awt_DrawingSurface.c", line 267: warning: improper pointer/integer combination: op "="
"../../../src/solaris/native/sun/awt/awt_InputMethod.c", line 50: warning: macro redefined: XtWindow
"../../../src/solaris/native/sun/awt/awt_UNIXToolkit.c", line 115: warning: argument #5 is incompatible with prototype:
"../../../src/solaris/native/sun/awt/gtk2_interface.c", line 1057: warning: declaration can not follow a statement
"../../../src/solaris/native/sun/awt/gtk2_interface.c", line 1105: warning: declaration can not follow a statement
"../../../src/solaris/native/sun/awt/gtk2_interface.c", line 1299: warning: declaration can not follow a statement
"../../../src/solaris/native/sun/awt/gtk2_interface.c", line 1667: warning: non-constant initializer: op "NAME"
"../../../src/solaris/native/sun/awt/gtk2_interface.c", line 1902: warning: declaration can not follow a statement
"../../../src/solaris/native/sun/awt/gtk2_interface.c", line 1911: warning: declaration can not follow a statement
"../../../src/solaris/native/sun/awt/gtk2_interface.c", line 1930: warning: declaration can not follow a statement
"../../../src/solaris/native/sun/awt/gtk2_interface.c", line 1985: warning: declaration can not follow a statement
"../../../src/solaris/native/sun/awt/gtk2_interface.c", line 1988: warning: declaration can not follow a statement
"../../../src/solaris/native/sun/awt/gtk2_interface.c", line 1992: warning: declaration can not follow a statement
"../../../src/solaris/native/sun/awt/gtk2_interface.c", line 2229: warning: declaration can not follow a statement
"../../../src/solaris/native/sun/awt/gtk2_interface.c", line 2230: warning: declaration can not follow a statement
"../../../src/solaris/native/sun/awt/gtk2_interface.c", line 404: warning: assignment type mismatch:
"../../../src/solaris/native/sun/awt/gtk2_interface.c", line 430: warning: assignment type mismatch:
"../../../src/solaris/native/sun/awt/gtk2_interface.c", line 437: warning: assignment type mismatch:

...

                                    

Comments
EVALUATION

Most of the warnings are in Java2D (medialib) and Swing (GTK L&F) code, so I'm dispatching this CR to them.
                                     
2008-07-15
EVALUATION

OpenGL, medialib and gtk2 warnings are split into separate reports.

Rest seems to be AWT:

"../../../src/share/native/sun/awt/libpng/pngrtran.c", line 3996: warning: storage class after type is obsolescent
"../../../src/share/native/sun/awt/libpng/pngrutil.c", line 212: warning: storage class after type is obsolescent
"../../../src/share/native/sun/awt/splashscreen/splashscreen_gif.c", line 169: warning: integer overflow detected: op "<<"
"../../../src/share/native/sun/awt/splashscreen/splashscreen_gif.c", line 228: warning: integer overflow detected: op "<<"
"../../../src/solaris/native/sun/awt/awt_DrawingSurface.c", line 267: warning: improper pointer/integer combination: op "="
"../../../src/solaris/native/sun/awt/awt_InputMethod.c", line 50: warning: macro redefined: XtWindow
"../../../src/solaris/native/sun/awt/awt_UNIXToolkit.c", line 115: warning: argument #5 is incompatible with prototype:
                                     
2008-07-15



Hardware and Software, Engineered to Work Together