RFR: 8294466: Minimize disabled warnings in java.desktop

Magnus Ihse Bursie ihse at openjdk.org
Thu Oct 20 18:55:55 UTC 2022


On Thu, 20 Oct 2022 18:14:45 GMT, Erik Joelsson <erikj at openjdk.org> wrote:

>> After JDK-8294281, it is now possible to disable warnings for individual files instead for whole libraries. I used this opportunity to go through all disabled warnings in java.desktop native libraries.
>> 
>> Any warnings that were only triggered in a few files were removed from the library as a whole, and changed to be only disabled for those files.
>> 
>> Some warnings didn't trigger in any file anymore, and could just be removed.
>> 
>> (This is a reboot of https://github.com/openjdk/jdk/pull/10453)
>
> make/modules/java.desktop/lib/Awt2dLibraries.gmk line 222:
> 
>> 220:     endif
>> 221: 
>> 222:     ifeq ($(TOOLCHAIN_TYPE), gcc)
> 
> How did you solve this?

I did not solve anything. Apparently the code has changed so the warnings is no longer triggered. Or that's at least what I assume, just as for other warnings that were no longer needed.

It might be that it also triggered only for older versions of gcc. I've tested with a couple of different versions, but I have not done an extensive test of all possible gcc version. The worst thing that can happen is that some specific, old version of gcc will still trigger these (or any other removed) warning(s). If that happens, the speedy workaround is to run with `--disable-warnings-as-error`, and then I'll restore the warning, possibly with a version check.

-------------

PR: https://git.openjdk.org/jdk/pull/10790



More information about the build-dev mailing list