mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8025613: clang: remove -Wno-unused-value
Reviewed-by: iveresov
This commit is contained in:
parent
30874d35f1
commit
9376d94e6c
8 changed files with 13 additions and 10 deletions
|
@ -29,6 +29,7 @@
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
||||||
|
@ -80,7 +81,7 @@ JNIEXPORT void JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_in
|
||||||
(JNIEnv *env, jclass cls) {
|
(JNIEnv *env, jclass cls) {
|
||||||
jclass listClass;
|
jclass listClass;
|
||||||
|
|
||||||
if (init_libproc(getenv("LIBSAPROC_DEBUG")) != true) {
|
if (init_libproc(getenv("LIBSAPROC_DEBUG") != NULL) != true) {
|
||||||
THROW_NEW_DEBUGGER_EXCEPTION("can't initialize libproc");
|
THROW_NEW_DEBUGGER_EXCEPTION("can't initialize libproc");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,8 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/wait.h>
|
||||||
#include <sys/ptrace.h>
|
#include <sys/ptrace.h>
|
||||||
#include "libproc_impl.h"
|
#include "libproc_impl.h"
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
#include "salibelf.h"
|
#include "salibelf.h"
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
extern void print_debug(const char*,...);
|
extern void print_debug(const char*,...);
|
||||||
|
|
||||||
|
|
|
@ -305,7 +305,7 @@ static struct symtab* build_symtab_from_build_id(Elf64_Nhdr *note)
|
||||||
|
|
||||||
unsigned char *bytes
|
unsigned char *bytes
|
||||||
= (unsigned char*)(note+1) + note->n_namesz;
|
= (unsigned char*)(note+1) + note->n_namesz;
|
||||||
unsigned char *filename
|
char *filename
|
||||||
= (build_id_to_debug_filename (note->n_descsz, bytes));
|
= (build_id_to_debug_filename (note->n_descsz, bytes));
|
||||||
|
|
||||||
fd = pathmap_open(filename);
|
fd = pathmap_open(filename);
|
||||||
|
|
|
@ -247,7 +247,7 @@ endif
|
||||||
|
|
||||||
ifeq ($(USE_CLANG), true)
|
ifeq ($(USE_CLANG), true)
|
||||||
# However we need to clean the code up before we can unrestrictedly enable this option with Clang
|
# However we need to clean the code up before we can unrestrictedly enable this option with Clang
|
||||||
WARNINGS_ARE_ERRORS += -Wno-unused-value -Wno-logical-op-parentheses -Wno-parentheses-equality -Wno-parentheses
|
WARNINGS_ARE_ERRORS += -Wno-logical-op-parentheses -Wno-parentheses-equality -Wno-parentheses
|
||||||
WARNINGS_ARE_ERRORS += -Wno-switch -Wno-tautological-compare
|
WARNINGS_ARE_ERRORS += -Wno-switch -Wno-tautological-compare
|
||||||
# Not yet supported by clang in Xcode 4.6.2
|
# Not yet supported by clang in Xcode 4.6.2
|
||||||
# WARNINGS_ARE_ERRORS += -Wno-tautological-constant-out-of-range-compare
|
# WARNINGS_ARE_ERRORS += -Wno-tautological-constant-out-of-range-compare
|
||||||
|
@ -262,7 +262,7 @@ ifeq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \&
|
||||||
# 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
|
WARNING_FLAGS = -Wunused-function
|
||||||
ifeq ($(USE_CLANG),)
|
ifeq ($(USE_CLANG),)
|
||||||
WARNINGS_FLAGS += -Wconversion
|
WARNING_FLAGS += -Wconversion
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
@ -208,7 +208,7 @@ WARNINGS_ARE_ERRORS = -Werror
|
||||||
|
|
||||||
ifeq ($(USE_CLANG), true)
|
ifeq ($(USE_CLANG), true)
|
||||||
# However we need to clean the code up before we can unrestrictedly enable this option with Clang
|
# However we need to clean the code up before we can unrestrictedly enable this option with Clang
|
||||||
WARNINGS_ARE_ERRORS += -Wno-unused-value -Wno-logical-op-parentheses -Wno-parentheses-equality -Wno-parentheses
|
WARNINGS_ARE_ERRORS += -Wno-logical-op-parentheses -Wno-parentheses-equality -Wno-parentheses
|
||||||
WARNINGS_ARE_ERRORS += -Wno-switch -Wno-tautological-constant-out-of-range-compare -Wno-tautological-compare
|
WARNINGS_ARE_ERRORS += -Wno-switch -Wno-tautological-constant-out-of-range-compare -Wno-tautological-compare
|
||||||
WARNINGS_ARE_ERRORS += -Wno-delete-non-virtual-dtor -Wno-deprecated -Wno-format -Wno-dynamic-class-memaccess
|
WARNINGS_ARE_ERRORS += -Wno-delete-non-virtual-dtor -Wno-deprecated -Wno-format -Wno-dynamic-class-memaccess
|
||||||
WARNINGS_ARE_ERRORS += -Wno-return-type -Wno-empty-body
|
WARNINGS_ARE_ERRORS += -Wno-return-type -Wno-empty-body
|
||||||
|
|
|
@ -4769,7 +4769,7 @@ void Assembler::adcq(Register dst, Address src) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Assembler::adcq(Register dst, Register src) {
|
void Assembler::adcq(Register dst, Register src) {
|
||||||
(int) prefixq_and_encode(dst->encoding(), src->encoding());
|
(void) prefixq_and_encode(dst->encoding(), src->encoding());
|
||||||
emit_arith(0x13, 0xC0, dst, src);
|
emit_arith(0x13, 0xC0, dst, src);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4824,7 +4824,7 @@ void Assembler::andq(Register dst, Address src) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Assembler::andq(Register dst, Register src) {
|
void Assembler::andq(Register dst, Register src) {
|
||||||
(int) prefixq_and_encode(dst->encoding(), src->encoding());
|
(void) prefixq_and_encode(dst->encoding(), src->encoding());
|
||||||
emit_arith(0x23, 0xC0, dst, src);
|
emit_arith(0x23, 0xC0, dst, src);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -977,7 +977,7 @@ Method* DefaultMethods::find_super_default(
|
||||||
return target;
|
return target;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef PRODUCT
|
#ifdef ASSERT
|
||||||
// Return true is broad type is a covariant return of narrow type
|
// Return true is broad type is a covariant return of narrow type
|
||||||
static bool covariant_return_type(BasicType narrow, BasicType broad) {
|
static bool covariant_return_type(BasicType narrow, BasicType broad) {
|
||||||
if (narrow == broad) {
|
if (narrow == broad) {
|
||||||
|
@ -988,7 +988,7 @@ static bool covariant_return_type(BasicType narrow, BasicType broad) {
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#endif // ndef PRODUCT
|
#endif
|
||||||
|
|
||||||
static int assemble_redirect(
|
static int assemble_redirect(
|
||||||
BytecodeConstantPool* cp, BytecodeBuffer* buffer,
|
BytecodeConstantPool* cp, BytecodeBuffer* buffer,
|
||||||
|
@ -1281,4 +1281,3 @@ static void merge_in_new_methods(InstanceKlass* klass,
|
||||||
MetadataFactory::free_array(cld, original_ordering);
|
MetadataFactory::free_array(cld, original_ordering);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue