mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8022956: Clang: enable return type warnings on BSD
Reviewed-by: coleenp, sla
This commit is contained in:
parent
9c2ac55d23
commit
9e056eedc4
16 changed files with 54 additions and 15 deletions
|
@ -247,7 +247,7 @@ ifeq ($(USE_CLANG), true)
|
|||
# Not yet supported by clang in Xcode 4.6.2
|
||||
# WARNINGS_ARE_ERRORS += -Wno-tautological-constant-out-of-range-compare
|
||||
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-empty-body
|
||||
endif
|
||||
|
||||
WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wundef
|
||||
|
|
|
@ -50,6 +50,7 @@ int AbstractAssembler::code_fill_byte() {
|
|||
#ifdef ASSERT
|
||||
bool AbstractAssembler::pd_check_instruction_mark() {
|
||||
ShouldNotCallThis();
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -73,6 +74,7 @@ void MacroAssembler::advance(int bytes) {
|
|||
RegisterOrConstant MacroAssembler::delayed_value_impl(
|
||||
intptr_t* delayed_value_addr, Register tmpl, int offset) {
|
||||
ShouldNotCallThis();
|
||||
return RegisterOrConstant();
|
||||
}
|
||||
|
||||
void MacroAssembler::store_oop(jobject obj) {
|
||||
|
|
|
@ -1008,6 +1008,7 @@ void BytecodeInterpreter::layout_interpreterState(interpreterState istate,
|
|||
|
||||
address CppInterpreter::return_entry(TosState state, int length) {
|
||||
ShouldNotCallThis();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
address CppInterpreter::deopt_entry(TosState state, int length) {
|
||||
|
|
|
@ -116,6 +116,7 @@ void frame::patch_pc(Thread* thread, address pc) {
|
|||
|
||||
bool frame::safe_for_sender(JavaThread *thread) {
|
||||
ShouldNotCallThis();
|
||||
return false;
|
||||
}
|
||||
|
||||
void frame::pd_gc_epilog() {
|
||||
|
@ -123,6 +124,7 @@ void frame::pd_gc_epilog() {
|
|||
|
||||
bool frame::is_interpreted_frame_valid(JavaThread *thread) const {
|
||||
ShouldNotCallThis();
|
||||
return false;
|
||||
}
|
||||
|
||||
BasicType frame::interpreter_frame_result(oop* oop_result,
|
||||
|
@ -184,9 +186,8 @@ BasicType frame::interpreter_frame_result(oop* oop_result,
|
|||
int frame::frame_size(RegisterMap* map) const {
|
||||
#ifdef PRODUCT
|
||||
ShouldNotCallThis();
|
||||
#else
|
||||
return 0; // make javaVFrame::print_value work
|
||||
#endif // PRODUCT
|
||||
return 0; // make javaVFrame::print_value work
|
||||
}
|
||||
|
||||
intptr_t* frame::interpreter_frame_tos_at(jint offset) const {
|
||||
|
|
|
@ -36,7 +36,7 @@ inline frame::frame() {
|
|||
_deopt_state = unknown;
|
||||
}
|
||||
|
||||
inline address frame::sender_pc() const { ShouldNotCallThis(); }
|
||||
inline address frame::sender_pc() const { ShouldNotCallThis(); return NULL; }
|
||||
|
||||
inline frame::frame(ZeroFrame* zf, intptr_t* sp) {
|
||||
_zeroframe = zf;
|
||||
|
@ -89,6 +89,7 @@ inline intptr_t* frame::real_fp() const {
|
|||
|
||||
inline intptr_t* frame::link() const {
|
||||
ShouldNotCallThis();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifdef CC_INTERP
|
||||
|
@ -151,14 +152,17 @@ inline void frame::set_saved_oop_result(RegisterMap* map, oop obj) {
|
|||
|
||||
inline oop frame::saved_oop_result(RegisterMap* map) const {
|
||||
ShouldNotCallThis();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
inline bool frame::is_older(intptr_t* id) const {
|
||||
ShouldNotCallThis();
|
||||
return false;
|
||||
}
|
||||
|
||||
inline intptr_t* frame::entry_frame_argument_at(int offset) const {
|
||||
ShouldNotCallThis();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
inline intptr_t* frame::unextended_sp() const {
|
||||
|
|
|
@ -49,8 +49,10 @@ void InlineCacheBuffer::assemble_ic_buffer_code(address code_begin,
|
|||
address InlineCacheBuffer::ic_buffer_entry_point(address code_begin) {
|
||||
// NB ic_stub_code_size() must return the size of the code we generate
|
||||
ShouldNotCallThis();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void* InlineCacheBuffer::ic_buffer_cached_value(address code_begin) {
|
||||
ShouldNotCallThis();
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -40,6 +40,7 @@ class InterpreterMacroAssembler : public MacroAssembler {
|
|||
Register tmp,
|
||||
int offset) {
|
||||
ShouldNotCallThis();
|
||||
return RegisterOrConstant();
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -64,6 +64,7 @@ address InterpreterGenerator::generate_math_entry(
|
|||
return NULL;
|
||||
|
||||
Unimplemented();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
address InterpreterGenerator::generate_abstract_entry() {
|
||||
|
|
|
@ -51,15 +51,18 @@ class NativeInstruction VALUE_OBJ_CLASS_SPEC {
|
|||
public:
|
||||
bool is_jump() {
|
||||
ShouldNotCallThis();
|
||||
return false;
|
||||
}
|
||||
|
||||
bool is_safepoint_poll() {
|
||||
ShouldNotCallThis();
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
inline NativeInstruction* nativeInstruction_at(address address) {
|
||||
ShouldNotCallThis();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
class NativeCall : public NativeInstruction {
|
||||
|
@ -70,18 +73,22 @@ class NativeCall : public NativeInstruction {
|
|||
|
||||
address instruction_address() const {
|
||||
ShouldNotCallThis();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
address next_instruction_address() const {
|
||||
ShouldNotCallThis();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
address return_address() const {
|
||||
ShouldNotCallThis();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
address destination() const {
|
||||
ShouldNotCallThis();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void set_destination_mt_safe(address dest) {
|
||||
|
@ -98,25 +105,30 @@ class NativeCall : public NativeInstruction {
|
|||
|
||||
static bool is_call_before(address return_address) {
|
||||
ShouldNotCallThis();
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
inline NativeCall* nativeCall_before(address return_address) {
|
||||
ShouldNotCallThis();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
inline NativeCall* nativeCall_at(address address) {
|
||||
ShouldNotCallThis();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
class NativeMovConstReg : public NativeInstruction {
|
||||
public:
|
||||
address next_instruction_address() const {
|
||||
ShouldNotCallThis();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
intptr_t data() const {
|
||||
ShouldNotCallThis();
|
||||
return 0;
|
||||
}
|
||||
|
||||
void set_data(intptr_t x) {
|
||||
|
@ -126,12 +138,14 @@ class NativeMovConstReg : public NativeInstruction {
|
|||
|
||||
inline NativeMovConstReg* nativeMovConstReg_at(address address) {
|
||||
ShouldNotCallThis();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
class NativeMovRegMem : public NativeInstruction {
|
||||
public:
|
||||
int offset() const {
|
||||
ShouldNotCallThis();
|
||||
return 0;
|
||||
}
|
||||
|
||||
void set_offset(intptr_t x) {
|
||||
|
@ -145,6 +159,7 @@ class NativeMovRegMem : public NativeInstruction {
|
|||
|
||||
inline NativeMovRegMem* nativeMovRegMem_at(address address) {
|
||||
ShouldNotCallThis();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
class NativeJump : public NativeInstruction {
|
||||
|
@ -155,6 +170,7 @@ class NativeJump : public NativeInstruction {
|
|||
|
||||
address jump_destination() const {
|
||||
ShouldNotCallThis();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void set_jump_destination(address dest) {
|
||||
|
@ -172,12 +188,14 @@ class NativeJump : public NativeInstruction {
|
|||
|
||||
inline NativeJump* nativeJump_at(address address) {
|
||||
ShouldNotCallThis();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
class NativeGeneralJump : public NativeInstruction {
|
||||
public:
|
||||
address jump_destination() const {
|
||||
ShouldNotCallThis();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void insert_unconditional(address code_pos, address entry) {
|
||||
|
@ -191,6 +209,7 @@ class NativeGeneralJump : public NativeInstruction {
|
|||
|
||||
inline NativeGeneralJump* nativeGeneralJump_at(address address) {
|
||||
ShouldNotCallThis();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#endif // CPU_ZERO_VM_NATIVEINST_ZERO_HPP
|
||||
|
|
|
@ -32,8 +32,10 @@ const int ConcreteRegisterImpl::max_fpr =
|
|||
|
||||
const char* RegisterImpl::name() const {
|
||||
ShouldNotCallThis();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
const char* FloatRegisterImpl::name() const {
|
||||
ShouldNotCallThis();
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -37,6 +37,7 @@ void Relocation::pd_set_data_value(address x, intptr_t o, bool verify_only) {
|
|||
|
||||
address Relocation::pd_call_destination(address orig_addr) {
|
||||
ShouldNotCallThis();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void Relocation::pd_set_call_destination(address x) {
|
||||
|
@ -45,6 +46,7 @@ void Relocation::pd_set_call_destination(address x) {
|
|||
|
||||
address Relocation::pd_get_address_from_code() {
|
||||
ShouldNotCallThis();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
address* Relocation::pd_address_in_code() {
|
||||
|
|
|
@ -89,6 +89,7 @@ nmethod *SharedRuntime::generate_native_wrapper(MacroAssembler *masm,
|
|||
ret_type);
|
||||
#else
|
||||
ShouldNotCallThis();
|
||||
return NULL;
|
||||
#endif // SHARK
|
||||
}
|
||||
|
||||
|
@ -99,6 +100,7 @@ int Deoptimization::last_frame_adjust(int callee_parameters,
|
|||
|
||||
uint SharedRuntime::out_preserve_stack_slots() {
|
||||
ShouldNotCallThis();
|
||||
return 0;
|
||||
}
|
||||
|
||||
JRT_LEAF(void, zero_stub())
|
||||
|
@ -135,4 +137,5 @@ int SharedRuntime::c_calling_convention(const BasicType *sig_bt,
|
|||
VMRegPair *regs,
|
||||
int total_args_passed) {
|
||||
ShouldNotCallThis();
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -39,16 +39,20 @@
|
|||
|
||||
VtableStub* VtableStubs::create_vtable_stub(int vtable_index) {
|
||||
ShouldNotCallThis();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
VtableStub* VtableStubs::create_itable_stub(int vtable_index) {
|
||||
ShouldNotCallThis();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int VtableStub::pd_code_size_limit(bool is_vtable_stub) {
|
||||
ShouldNotCallThis();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int VtableStub::pd_code_alignment() {
|
||||
ShouldNotCallThis();
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -715,6 +715,7 @@ JVM_handle_bsd_signal(int sig,
|
|||
err.report_and_die();
|
||||
|
||||
ShouldNotReachHere();
|
||||
return false;
|
||||
}
|
||||
|
||||
// From solaris_i486.s ported to bsd_i486.s
|
||||
|
|
|
@ -66,6 +66,7 @@ address os::current_stack_pointer() {
|
|||
|
||||
frame os::get_sender_for_C_frame(frame* fr) {
|
||||
ShouldNotCallThis();
|
||||
return frame();
|
||||
}
|
||||
|
||||
frame os::current_frame() {
|
||||
|
@ -103,16 +104,19 @@ void os::initialize_thread(Thread* thr) {
|
|||
|
||||
address os::Bsd::ucontext_get_pc(ucontext_t* uc) {
|
||||
ShouldNotCallThis();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ExtendedPC os::fetch_frame_from_context(void* ucVoid,
|
||||
intptr_t** ret_sp,
|
||||
intptr_t** ret_fp) {
|
||||
ShouldNotCallThis();
|
||||
return ExtendedPC();
|
||||
}
|
||||
|
||||
frame os::fetch_frame_from_context(void* ucVoid) {
|
||||
ShouldNotCallThis();
|
||||
return frame();
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT int
|
||||
|
@ -240,6 +244,7 @@ JVM_handle_bsd_signal(int sig,
|
|||
|
||||
sprintf(buf, fmt, sig, info->si_addr);
|
||||
fatal(buf);
|
||||
return false;
|
||||
}
|
||||
|
||||
void os::Bsd::init_thread_fpu_state(void) {
|
||||
|
@ -373,17 +378,7 @@ void os::print_register_info(outputStream *st, void *context) {
|
|||
|
||||
extern "C" {
|
||||
int SpinPause() {
|
||||
}
|
||||
|
||||
int SafeFetch32(int *adr, int errValue) {
|
||||
int value = errValue;
|
||||
value = *adr;
|
||||
return value;
|
||||
}
|
||||
intptr_t SafeFetchN(intptr_t *adr, intptr_t errValue) {
|
||||
intptr_t value = errValue;
|
||||
value = *adr;
|
||||
return value;
|
||||
return 1;
|
||||
}
|
||||
|
||||
void _Copy_conjoint_jshorts_atomic(jshort* from, jshort* to, size_t count) {
|
||||
|
|
|
@ -110,6 +110,7 @@
|
|||
void* ucontext,
|
||||
bool isInJava) {
|
||||
ShouldNotCallThis();
|
||||
return false;
|
||||
}
|
||||
|
||||
// These routines are only used on cpu architectures that
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue