RFR: 8374168: Resolve disabled warnings in JDWP agent [v4]
Chris Plummer
cjplummer at openjdk.org
Tue Dec 23 02:48:52 UTC 2025
On Tue, 23 Dec 2025 02:35:44 GMT, Alex Menkov <amenkov at openjdk.org> wrote:
> These are enums (i.e. ints) , GHA on Windows fail because they are 3 different enum types (warning 5287)
> For unknown reason (different MSVC version maybe) my local Windows build and our CI passed
This code that we have elsewhere in the debug agent seems to compile ok. Perhaps all that is needed is a cast of JVMTI_VERSION to jint:
static jboolean isVersionGte12x() {
jint version;
jvmtiError err =
JVMTI_FUNC_PTR(gdata->jvmti,GetVersionNumber)(gdata->jvmti, &version);
if (err == JVMTI_ERROR_NONE) {
jint major, minor;
major = (version & JVMTI_VERSION_MASK_MAJOR)
>> JVMTI_VERSION_SHIFT_MAJOR;
minor = (version & JVMTI_VERSION_MASK_MINOR)
>> JVMTI_VERSION_SHIFT_MINOR;
return (major > 1 || (major == 1 && minor >= 2)) ? JNI_TRUE : JNI_FALSE;
} else {
return JNI_FALSE;
}
}
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28937#discussion_r2641762486
More information about the serviceability-dev
mailing list