<AWT Dev> splashscreen_png.c compile error with gcc 4.9.2

Peter Levart peter.levart at gmail.com
Tue May 19 10:50:28 UTC 2015


Hi,

I hope this is the right thread to post the observation.

Building recent OpenJDK 9 from sources on Fedora 21 fails with this:

/home/peter/work/hg/jdk9-dev/jdk/src/java.desktop/share/native/libsplashscreen/splashscreen_png.c: 
In function 'SplashDecodePng':
/home/peter/work/hg/jdk9-dev/jdk/src/java.desktop/share/native/libsplashscreen/splashscreen_png.c:51:16: 
error: variable 'row_pointers' might be clobbered by 'longjmp' or 
'vfork' [-Werror=clobbered]
      png_bytepp row_pointers = NULL;
                 ^
/home/peter/work/hg/jdk9-dev/jdk/src/java.desktop/share/native/libsplashscreen/splashscreen_png.c:52:15: 
error: variable 'image_data' might be clobbered by 'longjmp' or 'vfork' 
[-Werror=clobbered]
      png_bytep image_data = NULL;
                ^
cc1: all warnings being treated as errors
gmake[3]: *** 
[/home/peter/work/hg/jdk9-dev/build/linux-x86_64-normal-server-release/support/native/java.desktop/libsplashscreen/splashscreen_png.o] 
Error 1
gmake[3]: *** Waiting for unfinished jobs....
Awt2dLibraries.gmk:879: recipe for target 
'/home/peter/work/hg/jdk9-dev/build/linux-x86_64-normal-server-release/support/native/java.desktop/libsplashscreen/splashscreen_png.o' 
failed
gmake[2]: *** [java.desktop-libs] Error 1
make/Main.gmk:168: recipe for target 'java.desktop-libs' failed


I found that making the following change eliminates the compiler error:

http://cr.openjdk.java.net/~plevart/jdk9-dev/splashscreen_png/webrev.01/

Is this the right way to fix it?

Regards, Peter



More information about the awt-dev mailing list