summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--openjdkjvmti/ti_heap.cc3
-rw-r--r--test/913-heaps/heaps.cc3
2 files changed, 6 insertions, 0 deletions
diff --git a/openjdkjvmti/ti_heap.cc b/openjdkjvmti/ti_heap.cc
index af74b67b17..49a6748c28 100644
--- a/openjdkjvmti/ti_heap.cc
+++ b/openjdkjvmti/ti_heap.cc
@@ -1583,6 +1583,8 @@ jvmtiError HeapExtensions::GetHeapName(jvmtiEnv* env, jint heap_id, char** heap_
}
}
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wcast-function-type-mismatch"
jvmtiError HeapExtensions::IterateThroughHeapExt(jvmtiEnv* env,
jint heap_filter,
jclass klass,
@@ -1614,6 +1616,7 @@ jvmtiError HeapExtensions::IterateThroughHeapExt(jvmtiEnv* env,
callbacks,
user_data);
}
+#pragma clang diagnostic pop
namespace {
diff --git a/test/913-heaps/heaps.cc b/test/913-heaps/heaps.cc
index 197230f01e..e857c4b57c 100644
--- a/test/913-heaps/heaps.cc
+++ b/test/913-heaps/heaps.cc
@@ -1119,6 +1119,8 @@ static jint JNICALL HeapIterationExtCallback([[maybe_unused]] jlong class_tag,
return 0;
}
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wcast-function-type-mismatch"
extern "C" JNIEXPORT void JNICALL Java_art_Test913_iterateThroughHeapExt(
JNIEnv* env, [[maybe_unused]] jclass klass) {
CHECK(gIterateThroughHeapExt != nullptr);
@@ -1132,6 +1134,7 @@ extern "C" JNIEXPORT void JNICALL Java_art_Test913_iterateThroughHeapExt(
JvmtiErrorToException(env, jvmti_env, ret);
CHECK(gFoundExt);
}
+#pragma clang diagnostic pop
extern "C" JNIEXPORT jboolean JNICALL Java_art_Test913_checkInitialized(JNIEnv* env, jclass, jclass c) {
jint status;