RFR 8037825 Fix warnings and enable "warnings as errors" in serviceability native libraries
Magnus Ihse Bursie
magnus.ihse.bursie at oracle.com
Wed Mar 19 12:59:15 UTC 2014
On 2014-03-19 13:30, Staffan Larsen wrote:
> The serviceability libraries (as defined by jdk/make/lib/ServiceabilityLibraries.gmk) should be compiled with "warnings as errors". To enable this all current warnings need to be fixed.
>
> The background for this is that we recently had a bug that could have easily been avoided if we had paid attention to the warnings.
>
> webrev: http://cr.openjdk.java.net/~sla/8037825/webrev.00/
> bug: https://bugs.openjdk.java.net/browse/JDK-8037825
Hi Staffan,
I have only looked at the build part of the fix. I have one request:
please check for toolchain type instead of operating system, e.g.
ifeq ($(TOOLCHAIN_TYPE), microsoft)
WARNINGS_ARE_ERRORS := /WX
else ifeq ($(TOOLCHAIN_TYPE), solstudio)
WARNINGS_ARE_ERRORS := -errtags -errwarn=%all
else ifeq ($(TOOLCHAIN_TYPE), gcc)
WARNINGS_ARE_ERRORS := -Werror
else ifeq ($(TOOLCHAIN_TYPE), clang)
WARNINGS_ARE_ERRORS := -Werror
endif
(with the clang part only if you have tested on clang, that is).
Apart from this, it looks good. Thank you for hunting down those
warnings! Great job!
/Magnus
More information about the build-dev
mailing list