8081295: Build failed with GCC 5.1.1
authorysuenaga
Fri, 29 May 2015 08:58:46 +0900
changeset 31157 25a62bb54efa
parent 31156 11ae3ca525cc
child 31158 062c7363dd12
8081295: Build failed with GCC 5.1.1 Summary: Array bounds and incorrect condition warnings happen with GCC 5.1.1 Reviewed-by: azvegint
jdk/make/lib/Awt2dLibraries.gmk
jdk/src/jdk.jdwp.agent/share/native/libjdwp/eventFilter.c
--- a/jdk/make/lib/Awt2dLibraries.gmk	Thu May 28 21:17:49 2015 +0300
+++ b/jdk/make/lib/Awt2dLibraries.gmk	Fri May 29 08:58:46 2015 +0900
@@ -54,7 +54,7 @@
     OPTIMIZATION := HIGHEST, \
     CFLAGS := $(CFLAGS_JDKLIB) \
         $(BUILD_LIBMLIB_CFLAGS), \
-    DISABLED_WARNINGS_gcc := parentheses, \
+    DISABLED_WARNINGS_gcc := parentheses array-bounds, \
     DISABLED_WARNINGS_clang := parentheses, \
     DISABLED_WARNINGS_solstudio := E_STATEMENT_NOT_REACHED, \
     MAPFILE := $(BUILD_LIBMLIB_IMAGE_MAPFILE), \
@@ -494,7 +494,7 @@
     CFLAGS := $(CFLAGS_JDKLIB) $(addprefix -I, $(LIBJAVAJPEG_SRC)) \
         $(LIBJAVA_HEADER_FLAGS) \
         -I$(SUPPORT_OUTPUTDIR)/headers/java.desktop, \
-    DISABLED_WARNINGS_gcc := clobbered parentheses, \
+    DISABLED_WARNINGS_gcc := clobbered parentheses array-bounds, \
     DISABLED_WARNINGS_clang := logical-op-parentheses, \
     DISABLED_WARNINGS_microsoft := 4267, \
     MAPFILE := $(BUILD_LIBJAVAJPEG_MAPFILE), \
--- a/jdk/src/jdk.jdwp.agent/share/native/libjdwp/eventFilter.c	Thu May 28 21:17:49 2015 +0300
+++ b/jdk/src/jdk.jdwp.agent/share/native/libjdwp/eventFilter.c	Fri May 29 08:58:46 2015 +0900
@@ -518,8 +518,8 @@
 
           case JDWP_REQUEST_MODIFIER(SourceNameMatch): {
               char* desiredNamePattern = filter->u.SourceNameOnly.sourceNamePattern;
-              if (!searchAllSourceNames(env, clazz,
-                           desiredNamePattern) == 1) {
+              if (searchAllSourceNames(env, clazz,
+                           desiredNamePattern) != 1) {
                   /* The name isn't in the SDE; try the sourceName in the ref
                    * type
                    */