8022263: use same Clang warnings on BSD as on Linux

Reviewed-by: kvn, iveresov
This commit is contained in:
Christian Thalinger 2014-01-07 14:26:12 -08:00
parent 417b5f07b7
commit dd042bf16e
5 changed files with 5 additions and 50 deletions

View file

@ -260,14 +260,13 @@ ifeq ($(USE_CLANG), true)
WARNINGS_ARE_ERRORS += -Wno-empty-body WARNINGS_ARE_ERRORS += -Wno-empty-body
endif 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 # 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. # conversions which might affect the values. Only enable it in earlier versions.
WARNING_FLAGS = -Wunused-function ifeq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "0"
ifeq ($(USE_CLANG),) WARNINGS_FLAGS += -Wconversion
WARNING_FLAGS += -Wconversion
endif endif
endif endif

View file

@ -43,32 +43,6 @@ char *toUpper(const char *str) {
return result; 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 Methods-------------------------------
ChainList::ChainList() { ChainList::ChainList() {
} }

View file

@ -29,7 +29,6 @@
static void usage(ArchDesc& AD); // Print usage message and exit static void usage(ArchDesc& AD); // Print usage message and exit
static char *strip_ext(char *fname); // Strip off name extension 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 *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 static int get_legal_text(FileBuff &fbuf, char **legal_text); // Get pointer to legal text
ArchDesc* globalAD = NULL; // global reference to Architecture Description object ArchDesc* globalAD = NULL; // global reference to Architecture Description object

View file

@ -35,23 +35,6 @@ static bool is_def(int usedef) {
return false; 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. // Define an array containing the machine register names, strings.
static void defineRegNames(FILE *fp, RegisterForm *registers) { static void defineRegNames(FILE *fp, RegisterForm *registers) {
if (registers) { if (registers) {

View file

@ -613,7 +613,7 @@ void AsyncGetCallTrace(ASGCT_CallTrace *trace, jint depth, void* ucontext) {
#ifdef __APPLE__ #ifdef __APPLE__
// XXXDARWIN: Link errors occur even when __attribute__((weak_import)) // XXXDARWIN: Link errors occur even when __attribute__((weak_import))
// is added // 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 #else
void collector_func_load(char* name, void collector_func_load(char* name,
void* null_argument_1, void* null_argument_1,