Remove -Wno-unused-parameter and -Wno-sign-promo from base cflags.
Fix associated errors about unused paramenters and implict sign conversions.
For sign conversion this was largely in the area of enums, so add ostream
operators for the effected enums and fix tools/generate-operator-out.py.
Tidy arena allocation code and arena allocated data types, rather than fixing
new and delete operators.
Remove dead code.
Change-Id: I5b433e722d2f75baacfacae4d32aef4a828bfe1b
diff --git a/oatdump/oatdump.cc b/oatdump/oatdump.cc
index f565277..b78daf0 100644
--- a/oatdump/oatdump.cc
+++ b/oatdump/oatdump.cc
@@ -263,10 +263,13 @@
method_access_flags);
}
- void RegisterForDedup(const DexFile::ClassDef& class_def, uint32_t class_method_index,
- const OatFile::OatMethod& oat_method, const DexFile& dex_file,
- uint32_t dex_method_idx, const DexFile::CodeItem* code_item,
- uint32_t method_access_flags) {
+ void RegisterForDedup(const DexFile::ClassDef& class_def ATTRIBUTE_UNUSED,
+ uint32_t class_method_index ATTRIBUTE_UNUSED,
+ const OatFile::OatMethod& oat_method,
+ const DexFile& dex_file ATTRIBUTE_UNUSED,
+ uint32_t dex_method_idx ATTRIBUTE_UNUSED,
+ const DexFile::CodeItem* code_item ATTRIBUTE_UNUSED,
+ uint32_t method_access_flags ATTRIBUTE_UNUSED) {
state_[oat_method.GetCodeOffset()]++;
}
@@ -294,10 +297,13 @@
return DedupState::kDeduplicatedFirst;
}
- void AddSymbol(const DexFile::ClassDef& class_def, uint32_t class_method_index,
- const OatFile::OatMethod& oat_method, const DexFile& dex_file,
- uint32_t dex_method_idx, const DexFile::CodeItem* code_item,
- uint32_t method_access_flags) {
+ void AddSymbol(const DexFile::ClassDef& class_def ATTRIBUTE_UNUSED,
+ uint32_t class_method_index ATTRIBUTE_UNUSED,
+ const OatFile::OatMethod& oat_method,
+ const DexFile& dex_file,
+ uint32_t dex_method_idx,
+ const DexFile::CodeItem* code_item ATTRIBUTE_UNUSED,
+ uint32_t method_access_flags ATTRIBUTE_UNUSED) {
DedupState dedup = IsDuplicated(oat_method.GetCodeOffset());
if (dedup != DedupState::kDeduplicatedOther) {
std::string pretty_name = PrettyMethod(dex_method_idx, dex_file, true);
@@ -316,7 +322,7 @@
}
// Set oat data offset. Required by ElfBuilder/CodeOutput.
- void SetCodeOffset(size_t offset) {
+ void SetCodeOffset(size_t offset ATTRIBUTE_UNUSED) {
// Nothing to do.
}