riscv64: add missing UNUSED annotations.
The code compiles on other architectures that implement JNI compiler,
because they use these variables. However the code won't compile for
RISC-V as it falls into the default (unsupported) case.
Test: lunch aosp_riscv64-userdebug && m dist
Change-Id: I16010e806fe6c51fb0a7a20111e0d1feefde018c
diff --git a/compiler/jni/quick/calling_convention.cc b/compiler/jni/quick/calling_convention.cc
index ce9bee6..2b9da6b 100644
--- a/compiler/jni/quick/calling_convention.cc
+++ b/compiler/jni/quick/calling_convention.cc
@@ -74,6 +74,10 @@
is_static, is_synchronized, shorty));
#endif
default:
+ UNUSED(allocator);
+ UNUSED(is_static);
+ UNUSED(is_synchronized);
+ UNUSED(shorty);
LOG(FATAL) << "Unknown InstructionSet: " << instruction_set;
UNREACHABLE();
}
@@ -165,6 +169,12 @@
is_static, is_synchronized, is_fast_native, is_critical_native, shorty));
#endif
default:
+ UNUSED(allocator);
+ UNUSED(is_static);
+ UNUSED(is_synchronized);
+ UNUSED(is_fast_native);
+ UNUSED(is_critical_native);
+ UNUSED(shorty);
LOG(FATAL) << "Unknown InstructionSet: " << instruction_set;
UNREACHABLE();
}
diff --git a/compiler/optimizing/code_generator.cc b/compiler/optimizing/code_generator.cc
index 4d177c2..7c538a8 100644
--- a/compiler/optimizing/code_generator.cc
+++ b/compiler/optimizing/code_generator.cc
@@ -1037,6 +1037,9 @@
}
#endif
default:
+ UNUSED(allocator);
+ UNUSED(graph);
+ UNUSED(stats);
return nullptr;
}
}
diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc
index dbf247c..db39ff9 100644
--- a/compiler/optimizing/optimizing_compiler.cc
+++ b/compiler/optimizing/optimizing_compiler.cc
@@ -568,6 +568,9 @@
}
#endif
default:
+ UNUSED(graph);
+ UNUSED(dex_compilation_unit);
+ UNUSED(pass_observer);
return false;
}
}
diff --git a/compiler/trampolines/trampoline_compiler.cc b/compiler/trampolines/trampoline_compiler.cc
index 5e7ac83..a122d3c 100644
--- a/compiler/trampolines/trampoline_compiler.cc
+++ b/compiler/trampolines/trampoline_compiler.cc
@@ -208,6 +208,8 @@
return x86::CreateTrampoline(&allocator, offset);
#endif
default:
+ UNUSED(abi);
+ UNUSED(offset);
LOG(FATAL) << "Unexpected InstructionSet: " << isa;
UNREACHABLE();
}
diff --git a/compiler/utils/jni_macro_assembler.cc b/compiler/utils/jni_macro_assembler.cc
index f11b48d..8b47b38 100644
--- a/compiler/utils/jni_macro_assembler.cc
+++ b/compiler/utils/jni_macro_assembler.cc
@@ -58,6 +58,7 @@
return MacroAsm32UniquePtr(new (allocator) x86::X86JNIMacroAssembler(allocator));
#endif
default:
+ UNUSED(allocator);
LOG(FATAL) << "Unknown/unsupported 4B InstructionSet: " << instruction_set;
UNREACHABLE();
}
diff --git a/disassembler/disassembler.cc b/disassembler/disassembler.cc
index 53461ce..a05183a 100644
--- a/disassembler/disassembler.cc
+++ b/disassembler/disassembler.cc
@@ -62,6 +62,7 @@
return new x86::DisassemblerX86(options, /* supports_rex= */ true);
#endif
default:
+ UNUSED(options);
UNIMPLEMENTED(FATAL) << static_cast<uint32_t>(instruction_set);
UNREACHABLE();
}