提交 d618bcee 编写于 作者: T twisti

8022263: use same Clang warnings on BSD as on Linux

Reviewed-by: kvn, iveresov
上级 d04a39e7
......@@ -260,14 +260,13 @@ ifeq ($(USE_CLANG), true)
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
......
......@@ -43,32 +43,6 @@ char *toUpper(const char *str) {
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() {
}
......
......@@ -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
......
......@@ -35,23 +35,6 @@ static bool is_def(int usedef) {
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) {
......
......@@ -625,7 +625,7 @@ void AsyncGetCallTrace(ASGCT_CallTrace *trace, jint depth, void* ucontext) {
#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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册