8074859: Turn on warnings as error
authorihse
Fri, 08 May 2015 10:37:14 +0200
changeset 30434 6b881118c93b
parent 30433 959fd8f98b55
child 30435 f9d75cf4dab8
8074859: Turn on warnings as error Reviewed-by: erikj
jdk/make/CompileDemos.gmk
jdk/make/launcher/Launcher-jdk.accessibility.gmk
jdk/make/launcher/Launcher-jdk.pack200.gmk
jdk/make/lib/Awt2dLibraries.gmk
jdk/make/lib/CoreLibraries.gmk
jdk/make/lib/Lib-jdk.crypto.ucrypto.gmk
jdk/make/lib/NetworkingLibraries.gmk
jdk/make/lib/NioLibraries.gmk
jdk/make/lib/SoundLibraries.gmk
--- a/jdk/make/CompileDemos.gmk	Fri May 08 09:42:36 2015 +0200
+++ b/jdk/make/CompileDemos.gmk	Fri May 08 10:37:14 2015 +0200
@@ -396,7 +396,7 @@
   $(eval $(call SetupNativeCompilation,BUILD_LIBPOLLER, \
       SRC := $(DEMO_SOLARIS_SRC)/jni/Poller, \
       OPTIMIZATION := LOW, \
-      CFLAGS := $(CFLAGS_JDKLIB) $(SHARED_LIBRARY_FLAGS) \
+      CFLAGS := $(CFLAGS_JDKLIB) \
           -I$(SUPPORT_OUTPUTDIR)/demo/classes/jni/Poller, \
       LDFLAGS := $(LDFLAGS_JDKLIB), \
       LDFLAGS_SUFFIX_solaris := -lc, \
--- a/jdk/make/launcher/Launcher-jdk.accessibility.gmk	Fri May 08 09:42:36 2015 +0200
+++ b/jdk/make/launcher/Launcher-jdk.accessibility.gmk	Fri May 08 10:37:14 2015 +0200
@@ -39,7 +39,7 @@
       CFLAGS := $(filter-out -Zc:wchar_t-, $(CFLAGS_JDKEXE)) -Zc:wchar_t \
           -analyze- -Od -Gd -D_WINDOWS \
           -D_UNICODE -DUNICODE -RTC1 -EHsc, \
-      DISABLED_WARNINGS_microsoft := 4267, \
+      DISABLED_WARNINGS_microsoft := 4267 4996, \
       LDFLAGS := $(LDFLAGS_JDKEXE) \
           Advapi32.lib Version.lib User32.lib, \
       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/jdk.accessibility/jabswitch, \
--- a/jdk/make/launcher/Launcher-jdk.pack200.gmk	Fri May 08 09:42:36 2015 +0200
+++ b/jdk/make/launcher/Launcher-jdk.pack200.gmk	Fri May 08 10:37:14 2015 +0200
@@ -84,6 +84,7 @@
     CFLAGS_linux := -fPIC, \
     CFLAGS_solaris := -KPIC, \
     CFLAGS_macosx := -fPIC, \
+    DISABLED_WARNINGS_gcc := unused-result, \
     MAPFILE := $(UNPACK_MAPFILE),\
     LDFLAGS := $(UNPACKEXE_ZIPOBJS) \
         $(LDFLAGS_JDKEXE) $(LDFLAGS_CXX_JDK) \
--- a/jdk/make/lib/Awt2dLibraries.gmk	Fri May 08 09:42:36 2015 +0200
+++ b/jdk/make/lib/Awt2dLibraries.gmk	Fri May 08 10:37:14 2015 +0200
@@ -246,9 +246,10 @@
     CFLAGS := $(CFLAGS_JDKLIB) $(LIBAWT_CFLAGS), \
     DISABLED_WARNINGS_gcc := sign-compare unused-result maybe-uninitialized \
         format-nonliteral parentheses, \
-    DISABLED_WARNINGS_clang := logical-op-parentheses, \
+    DISABLED_WARNINGS_clang := logical-op-parentheses extern-initializer, \
     DISABLED_WARNINGS_solstudio := E_DECLARATION_IN_CODE, \
-    DISABLED_WARNINGS_microsoft := 4297 4244 4267, \
+    DISABLED_WARNINGS_microsoft := 4297 4244 4267 4996, \
+    WARNINGS_AS_ERRORS_gcc := false, \
     ASFLAGS := $(LIBAWT_ASFLAGS), \
     MAPFILE := $(LIBAWT_MAPFILE), \
     LDFLAGS := $(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN), \
@@ -357,6 +358,7 @@
             format-security int-to-pointer-cast parentheses, \
         DISABLED_WARNINGS_solstudio := E_DECLARATION_IN_CODE \
             E_ASSIGNMENT_TYPE_MISMATCH E_NON_CONST_INIT, \
+        WARNINGS_AS_ERRORS_gcc := false, \
         MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libawt_xawt/mapfile-vers, \
         LDFLAGS := $(LDFLAGS_JDKLIB) \
             $(X_LIBS) $(LIBAWT_XAWT_LDFLAGS) \
@@ -408,11 +410,11 @@
     INCLUDE_FILES := $(BUILD_LIBLCMS_INCLUDE_FILES), \
     OPTIMIZATION := HIGHEST, \
     CFLAGS := $(filter-out -xc99=%none, $(CFLAGS_JDKLIB)) \
-        $(SHARED_LIBRARY_FLAGS) $(LIBLCMS_CPPFLAGS) \
+        $(LIBLCMS_CPPFLAGS) \
         $(LCMS_CFLAGS), \
     CFLAGS_solaris := -xc99=no_lib, \
     CFLAGS_windows := -DCMS_IS_WINDOWS_, \
-    DISABLED_WARNINGS_gcc := format-nonliteral, \
+    DISABLED_WARNINGS_gcc := format-nonliteral type-limits, \
     DISABLED_WARNINGS_clang := tautological-compare, \
     DISABLED_WARNINGS_solstudio := E_STATEMENT_NOT_REACHED, \
     MAPFILE := $(JDK_TOPDIR)/make/mapfiles/liblcms/mapfile-vers, \
@@ -647,10 +649,13 @@
     OPTIMIZATION := $(LIBFONTMANAGER_OPTIMIZATION), \
     CFLAGS_windows = -DCC_NOEX, \
     DISABLED_WARNINGS_gcc := sign-compare int-to-pointer-cast reorder \
-        delete-non-virtual-dtor, \
-    DISABLED_WARNINGS_clang := unused-value incompatible-pointer-types, \
+        delete-non-virtual-dtor type-limits, \
+    DISABLED_WARNINGS_clang := unused-value incompatible-pointer-types \
+        tautological-constant-out-of-range-compare int-to-pointer-cast, \
     DISABLED_WARNINGS_solstudio := truncwarn, \
-    DISABLED_WARNINGS_microsoft := 4267 4244 4018 4090, \
+    DISABLED_WARNINGS_microsoft := 4267 4244 4018 4090 4996, \
+    WARNINGS_AS_ERRORS_gcc := false, \
+    WARNINGS_AS_ERRORS_solstudio := false, \
     MAPFILE := $(BUILD_LIBFONTMANAGER_MAPFILE), \
     LDFLAGS := $(subst -Xlinker -z -Xlinker defs,,$(LDFLAGS_JDKLIB)) $(LDFLAGS_CXX_JDK) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
@@ -882,7 +887,7 @@
                 $(GIFLIB_CFLAGS) $(LIBJPEG_CFLAGS) $(PNG_CFLAGS), \
       DISABLED_WARNINGS_gcc := type-limits unused-result maybe-uninitialized, \
       DISABLED_WARNINGS_clang := incompatible-pointer-types, \
-      DISABLED_WARNINGS_solstudio := E_NEWLINE_NOT_LAST, \
+      DISABLED_WARNINGS_solstudio := E_NEWLINE_NOT_LAST E_DECLARATION_IN_CODE, \
       DISABLED_WARNINGS_microsoft := 4244 4267, \
       MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libsplashscreen/mapfile-vers, \
       LDFLAGS := $(LDFLAGS_JDKLIB) \
@@ -956,6 +961,7 @@
       DISABLED_WARNINGS_clang := incomplete-implementation \
           deprecated-declarations objc-method-access bitwise-op-parentheses \
           incompatible-pointer-types parentheses-equality extra-tokens, \
+      WARNINGS_AS_ERRORS_clang := false, \
       LDFLAGS := $(LDFLAGS_JDKLIB) \
           $(call SET_SHARED_LIBRARY_ORIGIN) \
           -L$(INSTALL_LIBRARIES_HERE), \
--- a/jdk/make/lib/CoreLibraries.gmk	Fri May 08 09:42:36 2015 +0200
+++ b/jdk/make/lib/CoreLibraries.gmk	Fri May 08 10:37:14 2015 +0200
@@ -149,7 +149,8 @@
     DISABLED_WARNINGS_gcc := type-limits format-nonliteral, \
     DISABLED_WARNINGS_clang := int-conversion, \
     DISABLED_WARNINGS_solstudio := E_DECLARATION_IN_CODE, \
-    DISABLED_WARNINGS_microsoft := 4022 4267, \
+    DISABLED_WARNINGS_microsoft := 4022 4267 4996, \
+    WARNINGS_AS_ERRORS_solstudio := false, \
     MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjava/mapfile-vers, \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
--- a/jdk/make/lib/Lib-jdk.crypto.ucrypto.gmk	Fri May 08 09:42:36 2015 +0200
+++ b/jdk/make/lib/Lib-jdk.crypto.ucrypto.gmk	Fri May 08 10:37:14 2015 +0200
@@ -38,6 +38,7 @@
       OPTIMIZATION := LOW, \
       CFLAGS := $(CFLAGS_JDKLIB) \
           $(addprefix -I, $(LIBJ2UCRYPTO_SRC)), \
+      DISABLED_WARNINGS_solstudio := E_MACRO_REDEFINED, \
       MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libj2ucrypto/mapfile-vers, \
       LDFLAGS := $(LDFLAGS_JDKLIB), \
       LDFLAGS_SUFFIX := $(LIBDL), \
--- a/jdk/make/lib/NetworkingLibraries.gmk	Fri May 08 09:42:36 2015 +0200
+++ b/jdk/make/lib/NetworkingLibraries.gmk	Fri May 08 10:37:14 2015 +0200
@@ -34,7 +34,7 @@
         $(LIBJAVA_HEADER_FLAGS) $(addprefix -I, $(LIBNET_SRC_DIRS)), \
     DISABLED_WARNINGS_gcc := format-nonliteral, \
     DISABLED_WARNINGS_clang := parentheses-equality constant-logical-operand, \
-    DISABLED_WARNINGS_microsoft := 4244 4047 4133, \
+    DISABLED_WARNINGS_microsoft := 4244 4047 4133 4996, \
     MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libnet/mapfile-vers, \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
--- a/jdk/make/lib/NioLibraries.gmk	Fri May 08 09:42:36 2015 +0200
+++ b/jdk/make/lib/NioLibraries.gmk	Fri May 08 10:37:14 2015 +0200
@@ -70,7 +70,7 @@
         $(BUILD_LIBNIO_CFLAGS), \
     DISABLED_WARNINGS_gcc := type-limits, \
     DISABLED_WARNINGS_clang := tautological-compare, \
-    DISABLED_WARNINGS_microsoft := 4244, \
+    DISABLED_WARNINGS_microsoft := 4244 4996, \
     MAPFILE := $(BUILD_LIBNIO_MAPFILE), \
     LDFLAGS := $(LDFLAGS_JDKLIB) $(BUILD_LIBNIO_LDFLAGS) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
--- a/jdk/make/lib/SoundLibraries.gmk	Fri May 08 09:42:36 2015 +0200
+++ b/jdk/make/lib/SoundLibraries.gmk	Fri May 08 10:37:14 2015 +0200
@@ -125,6 +125,7 @@
     CXXFLAGS := $(CXXFLAGS_JDKLIB) $(LIBJSOUND_CFLAGS), \
     DISABLED_WARNINGS_clang := implicit-function-declaration \
         deprecated-writable-strings, \
+    WARNINGS_AS_ERRORS_clang := false, \
     MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjsound/mapfile-vers, \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \