summaryrefslogtreecommitdiff
path: root/test/2009-structural-local-ref/local-ref.cc
diff options
context:
space:
mode:
author Stefano Cianciulli <scianciulli@google.com> 2023-05-16 10:32:54 +0000
committer Stefano Cianciulli <scianciulli@google.com> 2023-05-22 10:36:39 +0000
commit78f3c72e8948087352788997a70854dee613352c (patch)
tree306db3c15bc4b7af149bcf3e07be533e50679b88 /test/2009-structural-local-ref/local-ref.cc
parentdc771261232c2ff702373f396a5a7fe586e2f0a6 (diff)
Use C++17's [[maybe_unused]] attribute in ART
Bug: 169680875 Test: mmm art Change-Id: Ic0cc320891c42b07a2b5520a584d2b62052e7235
Diffstat (limited to 'test/2009-structural-local-ref/local-ref.cc')
-rw-r--r--test/2009-structural-local-ref/local-ref.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/2009-structural-local-ref/local-ref.cc b/test/2009-structural-local-ref/local-ref.cc
index 9f6ef0b25a..5bd32872bb 100644
--- a/test/2009-structural-local-ref/local-ref.cc
+++ b/test/2009-structural-local-ref/local-ref.cc
@@ -32,7 +32,7 @@ namespace art {
namespace Test2009StructuralLocalRef {
extern "C" JNIEXPORT jstring JNICALL Java_art_Test2009_NativeLocalCallStatic(
- JNIEnv* env, jclass klass ATTRIBUTE_UNUSED, jobject obj, jobject thnk) {
+ JNIEnv* env, [[maybe_unused]] jclass klass, jobject obj, jobject thnk) {
jclass obj_klass = env->GetObjectClass(obj);
jmethodID run_meth = env->GetMethodID(env->FindClass("java/lang/Runnable"), "run", "()V");
env->CallVoidMethod(thnk, run_meth);
@@ -46,7 +46,7 @@ extern "C" JNIEXPORT jstring JNICALL Java_art_Test2009_NativeLocalCallStatic(
}
extern "C" JNIEXPORT jstring JNICALL Java_art_Test2009_NativeLocalCallVirtual(
- JNIEnv* env, jclass klass ATTRIBUTE_UNUSED, jobject obj, jobject thnk) {
+ JNIEnv* env, [[maybe_unused]] jclass klass, jobject obj, jobject thnk) {
jclass obj_klass = env->GetObjectClass(obj);
jmethodID run_meth = env->GetMethodID(env->FindClass("java/lang/Runnable"), "run", "()V");
env->CallVoidMethod(thnk, run_meth);
@@ -58,7 +58,7 @@ extern "C" JNIEXPORT jstring JNICALL Java_art_Test2009_NativeLocalCallVirtual(
}
}
extern "C" JNIEXPORT jstring JNICALL Java_art_Test2009_NativeLocalGetIField(
- JNIEnv* env, jclass klass ATTRIBUTE_UNUSED, jobject obj, jobject thnk) {
+ JNIEnv* env, [[maybe_unused]] jclass klass, jobject obj, jobject thnk) {
jclass obj_klass = env->GetObjectClass(obj);
jmethodID run_meth = env->GetMethodID(env->FindClass("java/lang/Runnable"), "run", "()V");
env->CallVoidMethod(thnk, run_meth);
@@ -71,7 +71,7 @@ extern "C" JNIEXPORT jstring JNICALL Java_art_Test2009_NativeLocalGetIField(
}
}
extern "C" JNIEXPORT jstring JNICALL Java_art_Test2009_NativeLocalGetSField(
- JNIEnv* env, jclass klass ATTRIBUTE_UNUSED, jobject obj, jobject thnk) {
+ JNIEnv* env, [[maybe_unused]] jclass klass, jobject obj, jobject thnk) {
jclass obj_klass = env->GetObjectClass(obj);
jmethodID run_meth = env->GetMethodID(env->FindClass("java/lang/Runnable"), "run", "()V");
env->CallVoidMethod(thnk, run_meth);