summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Ulya Trafimovich <skvadrik@google.com> 2023-01-25 18:02:28 +0000
committer Ulya Trofimovich <skvadrik@google.com> 2023-02-03 16:53:31 +0000
commit7aeee970ef7e398f2fee38ec3b57075f5e440161 (patch)
tree9cfbff564f192fcc472c73eb9a67d5923ed584a1
parent5e43dad53f664e8dcecdfb41c0a15abb659fa409 (diff)
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
-rw-r--r--compiler/jni/quick/calling_convention.cc10
-rw-r--r--compiler/optimizing/code_generator.cc3
-rw-r--r--compiler/optimizing/optimizing_compiler.cc3
-rw-r--r--compiler/trampolines/trampoline_compiler.cc2
-rw-r--r--compiler/utils/jni_macro_assembler.cc1
-rw-r--r--disassembler/disassembler.cc1
6 files changed, 20 insertions, 0 deletions
diff --git a/compiler/jni/quick/calling_convention.cc b/compiler/jni/quick/calling_convention.cc
index ce9bee63e3..2b9da6ba1a 100644
--- a/compiler/jni/quick/calling_convention.cc
+++ b/compiler/jni/quick/calling_convention.cc
@@ -74,6 +74,10 @@ std::unique_ptr<ManagedRuntimeCallingConvention> ManagedRuntimeCallingConvention
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 @@ std::unique_ptr<JniCallingConvention> JniCallingConvention::Create(ArenaAllocato
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 4d177c2f96..7c538a865d 100644
--- a/compiler/optimizing/code_generator.cc
+++ b/compiler/optimizing/code_generator.cc
@@ -1037,6 +1037,9 @@ std::unique_ptr<CodeGenerator> CodeGenerator::Create(HGraph* graph,
}
#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 dbf247cd64..db39ff98c3 100644
--- a/compiler/optimizing/optimizing_compiler.cc
+++ b/compiler/optimizing/optimizing_compiler.cc
@@ -568,6 +568,9 @@ bool OptimizingCompiler::RunArchOptimizations(HGraph* graph,
}
#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 5e7ac83b7d..a122d3c9d3 100644
--- a/compiler/trampolines/trampoline_compiler.cc
+++ b/compiler/trampolines/trampoline_compiler.cc
@@ -208,6 +208,8 @@ std::unique_ptr<const std::vector<uint8_t>> CreateTrampoline32(InstructionSet is
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 f11b48d8ca..8b47b38e63 100644
--- a/compiler/utils/jni_macro_assembler.cc
+++ b/compiler/utils/jni_macro_assembler.cc
@@ -58,6 +58,7 @@ MacroAsm32UniquePtr JNIMacroAssembler<PointerSize::k32>::Create(
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 53461ce5ae..a05183aed6 100644
--- a/disassembler/disassembler.cc
+++ b/disassembler/disassembler.cc
@@ -62,6 +62,7 @@ Disassembler* Disassembler::Create(InstructionSet instruction_set, DisassemblerO
return new x86::DisassemblerX86(options, /* supports_rex= */ true);
#endif
default:
+ UNUSED(options);
UNIMPLEMENTED(FATAL) << static_cast<uint32_t>(instruction_set);
UNREACHABLE();
}