Skip to content

Commit

Permalink
8313889: Fix -Wconversion warnings in foreign benchmarks
Browse files Browse the repository at this point in the history
Reviewed-by: pminborg, mcimadamore
  • Loading branch information
JornVernee committed Aug 8, 2023
1 parent 5c3041c commit 509f80b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/micro/org/openjdk/bench/java/lang/foreign/libQSortJNI.c
Expand Up @@ -56,7 +56,7 @@ JNIEXPORT void JNICALL Java_org_openjdk_bench_java_lang_foreign_QSort_jni_1qsort
jint* ints = (*env)->GetIntArrayElements(env, arr, NULL);
jsize length = (*env)->GetArrayLength(env, arr);

qsort(ints, length, sizeof(jint), &comparator);
qsort(ints, (size_t) length, sizeof(jint), &comparator);

(*env)->ReleaseIntArrayElements(env, arr, ints, 0);
}
Expand Down Expand Up @@ -84,6 +84,6 @@ JNIEXPORT void JNICALL Java_org_openjdk_bench_java_lang_foreign_QSort_jni_1qsort

jint* carr = (*env)->GetIntArrayElements(env, arr, 0);
jsize length = (*env)->GetArrayLength(env, arr);
qsort(carr, length, sizeof(jint), java_cmp);
qsort(carr, (size_t) length, sizeof(jint), java_cmp);
(*env)->ReleaseIntArrayElements(env, arr, carr, 0);
}

1 comment on commit 509f80b

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.