--- old/make/lib/Awt2dLibraries.gmk 2016-06-23 12:14:23.944348768 +0530 +++ new/make/lib/Awt2dLibraries.gmk 2016-06-23 12:14:23.752348768 +0530 @@ -346,15 +346,34 @@ ifeq ($(TOOLCHAIN_TYPE), gcc) # Turn off all warnings for the following files since they contain warnings # that cannot be turned of individually. - # redefining a macro - BUILD_LIBAWT_XAWT_gtk2_interface.c_CFLAGS := -w - # comparison between pointer and integer - BUILD_LIBAWT_XAWT_awt_Font.c_CFLAGS := -w # initializing a declared 'extern' BUILD_LIBAWT_XAWT_debug_mem.c_CFLAGS := -w # decimal constant is unsigned only in ISO C90 (JAVASE_EMBEDDED) BUILD_LIBAWT_XAWT_XToolkit.c_CFLAGS := -w - endif + + # Following files use macro from jdk/src/java.base/share/native/libjava/sizecalc.h + # These macros when used with 'unsigned int' result in 'type-limits' warning. + # These macros can be used with 'int' as well. + # Hence, warnings are suppressed from below files instead of changing the macros. + BUILD_LIBAWT_XAWT_gtk2_interface.c_CFLAGS := -Wno-type-limits + BUILD_LIBAWT_XAWT_gtk3_interface.c_CFLAGS := -Wno-type-limits + BUILD_LIBAWT_XAWT_XlibWrapper.c_CFLAGS := -Wno-type-limits + BUILD_LIBAWT_XAWT_fontpath.c_CFLAGS := -Wno-type-limits + + # Strings are constructed and populated using sprintf. + BUILD_LIBAWT_XAWT_OGLPaints.c_CFLAGS := -Wno-format-nonliteral + BUILD_LIBAWT_XAWT_OGLBufImgOps.c_CFLAGS := -Wno-format-nonliteral + endif + + ifeq ($(OPENJDK_TARGET_OS), solaris) + # function pointers are assigned void pointers + BUILD_LIBAWT_XAWT_awt_Taskbar.c_CFLAGS := -erroff=E_ASSIGNMENT_TYPE_MISMATCH + BUILD_LIBAWT_XAWT_gtk2_interface.c_CFLAGS := -erroff=E_ASSIGNMENT_TYPE_MISMATCH,E_NON_CONST_INIT + BUILD_LIBAWT_XAWT_gtk3_interface.c_CFLAGS := -erroff=E_ASSIGNMENT_TYPE_MISMATCH + endif + + # E_DECLARATION_IN_CODE warning from Solaris C compiler is suppressed as- + # There are places where the variables are declared after the validation checks(early returns) $(eval $(call SetupNativeCompilation,BUILD_LIBAWT_XAWT, \ LIBRARY := awt_xawt, \ @@ -365,11 +384,8 @@ CFLAGS := $(CFLAGS_JDKLIB) $(LIBAWT_XAWT_CFLAGS) \ $(X_CFLAGS), \ WARNINGS_AS_ERRORS_xlc := false, \ - DISABLED_WARNINGS_gcc := type-limits pointer-to-int-cast \ - deprecated-declarations unused-result maybe-uninitialized format \ - format-security int-to-pointer-cast parentheses, \ + DISABLED_WARNINGS_gcc := deprecated-declarations,\ DISABLED_WARNINGS_solstudio := E_DECLARATION_IN_CODE \ - E_ASSIGNMENT_TYPE_MISMATCH E_NON_CONST_INIT, \ MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libawt_xawt/mapfile-vers, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN) \