changeset 10625:9003f35baaa0 jdk8u252-b05 jdk8u262-b00

8022263: use same Clang warnings on BSD as on Linux Reviewed-by: kvn, iveresov
author twisti
date Tue, 07 Jan 2014 14:26:12 -0800
parents 68172de2a0d7
children b4fd7e078c54
files make/bsd/makefiles/gcc.make src/share/vm/adlc/archDesc.cpp src/share/vm/adlc/main.cpp src/share/vm/adlc/output_c.cpp src/share/vm/prims/forte.cpp
diffstat 5 files changed, 5 insertions(+), 50 deletions(-) [+]
line wrap: on
line diff
--- a/make/bsd/makefiles/gcc.make	Thu Feb 27 06:41:35 2020 +0000
+++ b/make/bsd/makefiles/gcc.make	Tue Jan 07 14:26:12 2014 -0800
@@ -260,14 +260,13 @@
   WARNINGS_ARE_ERRORS += -Wno-empty-body
 endif
 
-WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wundef
+WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wundef -Wunused-function -Wunused-value
 
-ifeq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "0"
+ifeq ($(USE_CLANG),)
   # Since GCC 4.3, -Wconversion has changed its meanings to warn these implicit
   # conversions which might affect the values. Only enable it in earlier versions.
-  WARNING_FLAGS = -Wunused-function
-  ifeq ($(USE_CLANG),)
-    WARNING_FLAGS += -Wconversion
+  ifeq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "0"
+    WARNINGS_FLAGS += -Wconversion
   endif
 endif
 
--- a/src/share/vm/adlc/archDesc.cpp	Thu Feb 27 06:41:35 2020 +0000
+++ b/src/share/vm/adlc/archDesc.cpp	Tue Jan 07 14:26:12 2014 -0800
@@ -43,32 +43,6 @@
   return result;
 }
 
-// Utilities to characterize effect statements
-static bool is_def(int usedef) {
-  switch(usedef) {
-  case Component::DEF:
-  case Component::USE_DEF: return true; break;
-  }
-  return false;
-}
-
-static bool is_use(int usedef) {
-  switch(usedef) {
-  case Component::USE:
-  case Component::USE_DEF:
-  case Component::USE_KILL: return true; break;
-  }
-  return false;
-}
-
-static bool is_kill(int usedef) {
-  switch(usedef) {
-  case Component::KILL:
-  case Component::USE_KILL: return true; break;
-  }
-  return false;
-}
-
 //---------------------------ChainList Methods-------------------------------
 ChainList::ChainList() {
 }
--- a/src/share/vm/adlc/main.cpp	Thu Feb 27 06:41:35 2020 +0000
+++ b/src/share/vm/adlc/main.cpp	Tue Jan 07 14:26:12 2014 -0800
@@ -29,7 +29,6 @@
 static void  usage(ArchDesc& AD);          // Print usage message and exit
 static char *strip_ext(char *fname);       // Strip off name extension
 static char *base_plus_suffix(const char* base, const char *suffix);// New concatenated string
-static char *prefix_plus_base_plus_suffix(const char* prefix, const char* base, const char *suffix);// New concatenated string
 static int get_legal_text(FileBuff &fbuf, char **legal_text); // Get pointer to legal text
 
 ArchDesc* globalAD = NULL;      // global reference to Architecture Description object
--- a/src/share/vm/adlc/output_c.cpp	Thu Feb 27 06:41:35 2020 +0000
+++ b/src/share/vm/adlc/output_c.cpp	Tue Jan 07 14:26:12 2014 -0800
@@ -35,23 +35,6 @@
   return false;
 }
 
-static bool is_use(int usedef) {
-  switch(usedef) {
-  case Component::USE:
-  case Component::USE_DEF:
-  case Component::USE_KILL: return true; break;
-  }
-  return false;
-}
-
-static bool is_kill(int usedef) {
-  switch(usedef) {
-  case Component::KILL:
-  case Component::USE_KILL: return true; break;
-  }
-  return false;
-}
-
 // Define  an array containing the machine register names, strings.
 static void defineRegNames(FILE *fp, RegisterForm *registers) {
   if (registers) {
--- a/src/share/vm/prims/forte.cpp	Thu Feb 27 06:41:35 2020 +0000
+++ b/src/share/vm/prims/forte.cpp	Tue Jan 07 14:26:12 2014 -0800
@@ -625,7 +625,7 @@
 #ifdef __APPLE__
 // XXXDARWIN: Link errors occur even when __attribute__((weak_import))
 // is added
-#define collector_func_load(x0,x1,x2,x3,x4,x5,x6) (0)
+#define collector_func_load(x0,x1,x2,x3,x4,x5,x6) ((void) 0)
 #else
 void    collector_func_load(char* name,
                             void* null_argument_1,