build warnings

Magnus Ihse Bursie magnus.ihse.bursie at oracle.com
Wed Dec 3 11:09:00 UTC 2014


On 2014-12-02 22:59, Jonathan Gibbons wrote:
> Build folk,
>
> The build has always generated warnings (sigh!) but right now, the 
> warnings look scarier than usual.
>
> In particular, when the build terminates, I get a couple of screenfuls 
> of messages like this:
>
> /w/jjg/work/jfm2.0/dev.8059977.sjfm/jdk/src/java.desktop/unix/native/libsplashscreen/splashscreen_sys.c: 
> In function ‘SplashScreenThread’:
> /w/jjg/work/jfm2.0/dev.8059977.sjfm/jdk/src/java.desktop/unix/native/libsplashscreen/splashscreen_sys.c:742:9: 
> warning: ignoring return value of ‘pipe’, declared with attribute 
> warn_unused_result [-Wunused-result]
>      pipe(splash->controlpipe);
>          ^
> /w/jjg/work/jfm2.0/dev.8059977.sjfm/jdk/src/java.desktop/share/native/libsplashscreen/splashscreen_gfx_impl.c: 
> In function ‘initFormat’:
> /w/jjg/work/jfm2.0/dev.8059977.sjfm/jdk/src/java.desktop/share/native/libsplashscreen/splashscreen_gfx_impl.c:305:34: 
> warning: ‘numBits’ may be used uninitialized in this function 
> [-Wmaybe-uninitialized]
>          format->shift[i] = shift + numBits - i * 8 - 8;
>                                   ^
>
> What would it take to have some sort of campaign to reduce build 
> warnings like these?  We've made good progress on lint and doclint 
> warnings for Java code and doc comments; what does it take to start on 
> native code warnings?

Actually, I've already started on such a campain. ;-)

I believe the way to go is:
1) disable all (or more or less all) of the current flood of warnings
2) open bugs for all disabled warnings on the corresponding components, 
indicating that the owner of the component should:
a) fix the issue with the source code and re-enable the warning, or
b) come up with a good reason why the warning is bad/broken and should 
be left disabled for that component.

I have started on 1). I have a local forest which disables most of the 
warnings for linux builds. I'm about to move on to the other platforms 
as well, but other work came between.

/Magnus



More information about the build-dev mailing list