From 647b1a86f518d8db0331b3d52a96392b7a62504b Mon Sep 17 00:00:00 2001 From: Ian Rogers Date: Fri, 10 Oct 2014 11:02:11 -0700 Subject: Fix 2 new sets of clang compiler warnings. Fix issues that are flagged by -Wfloat-equal and -Wmissing-noreturn. In the case of -Wfloat-equal the current cases in regular code are deliberate, so the change is to silence the warning. For gtest code the appropriate fix is to switch from EXPECT_EQ to EXPECT_(FLOAT|DOUBLE)_EQ. The -Wmissing-noreturn warning isn't enabled due to a missing noreturn in gtest. This issue has been reported to gtest. Change-Id: Id84c70c21c542716c9ee0c41492e8ff8788c4ef8 --- runtime/interpreter/interpreter_goto_table_impl.cc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'runtime/interpreter/interpreter_goto_table_impl.cc') diff --git a/runtime/interpreter/interpreter_goto_table_impl.cc b/runtime/interpreter/interpreter_goto_table_impl.cc index db7c452819..88d6544e80 100644 --- a/runtime/interpreter/interpreter_goto_table_impl.cc +++ b/runtime/interpreter/interpreter_goto_table_impl.cc @@ -662,6 +662,11 @@ JValue ExecuteGotoImpl(Thread* self, MethodHelper& mh, const DexFile::CodeItem* } HANDLE_INSTRUCTION_END(); +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wfloat-equal" +#endif + HANDLE_INSTRUCTION_START(CMPL_FLOAT) { float val1 = shadow_frame.GetVRegFloat(inst->VRegB_23x()); float val2 = shadow_frame.GetVRegFloat(inst->VRegC_23x()); @@ -726,6 +731,10 @@ JValue ExecuteGotoImpl(Thread* self, MethodHelper& mh, const DexFile::CodeItem* } HANDLE_INSTRUCTION_END(); +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + HANDLE_INSTRUCTION_START(CMP_LONG) { int64_t val1 = shadow_frame.GetVRegLong(inst->VRegB_23x()); int64_t val2 = shadow_frame.GetVRegLong(inst->VRegC_23x()); -- cgit v1.2.3