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
diff --git a/runtime/entrypoints/quick/quick_math_entrypoints.cc b/runtime/entrypoints/quick/quick_math_entrypoints.cc
index 014aad3..1c658b7 100644
--- a/runtime/entrypoints/quick/quick_math_entrypoints.cc
+++ b/runtime/entrypoints/quick/quick_math_entrypoints.cc
@@ -18,6 +18,11 @@
namespace art {
+#if defined(__clang__)
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wfloat-equal"
+#endif
+
int CmplFloat(float a, float b) {
if (a == b) {
return 0;
@@ -62,6 +67,10 @@
return -1;
}
+#if defined(__clang__)
+#pragma clang diagnostic pop
+#endif
+
extern "C" int64_t artLmul(int64_t a, int64_t b) {
return a * b;
}