ART: More warnings
Enable -Wno-conversion-null, -Wredundant-decls and -Wshadow in general,
and -Wunused-but-set-parameter for GCC builds.
Change-Id: I81bbdd762213444673c65d85edae594a523836e5
diff --git a/runtime/base/macros.h b/runtime/base/macros.h
index 90cf951..88b99a1 100644
--- a/runtime/base/macros.h
+++ b/runtime/base/macros.h
@@ -41,28 +41,6 @@
#define FINAL
#endif
-// The COMPILE_ASSERT macro can be used to verify that a compile time
-// expression is true. For example, you could use it to verify the
-// size of a static array:
-//
-// COMPILE_ASSERT(ARRAYSIZE(content_type_names) == CONTENT_NUM_TYPES,
-// content_type_names_incorrect_size);
-//
-// or to make sure a struct is smaller than a certain size:
-//
-// COMPILE_ASSERT(sizeof(foo) < 128, foo_too_large);
-//
-// The second argument to the macro is the name of the variable. If
-// the expression is false, most compilers will issue a warning/error
-// containing the name of the variable.
-
-template <bool>
-struct CompileAssert {
-};
-
-#define COMPILE_ASSERT(expr, msg) \
- typedef CompileAssert<(bool(expr))> msg[bool(expr) ? 1 : -1] // NOLINT
-
// Declare a friend relationship in a class with a test. Used rather that FRIEND_TEST to avoid
// globally importing gtest/gtest.h into the main ART header files.
#define ART_FRIEND_TEST(test_set_name, individual_test)\
diff --git a/runtime/base/stringpiece.h b/runtime/base/stringpiece.h
index b8de308..d793bb6 100644
--- a/runtime/base/stringpiece.h
+++ b/runtime/base/stringpiece.h
@@ -67,8 +67,8 @@
ptr_ = nullptr;
length_ = 0;
}
- void set(const char* data, size_type len) {
- ptr_ = data;
+ void set(const char* data_in, size_type len) {
+ ptr_ = data_in;
length_ = len;
}
void set(const char* str) {
@@ -79,8 +79,8 @@
length_ = 0;
}
}
- void set(const void* data, size_type len) {
- ptr_ = reinterpret_cast<const char*>(data);
+ void set(const void* data_in, size_type len) {
+ ptr_ = reinterpret_cast<const char*>(data_in);
length_ = len;
}