代码拉取完成,页面将自动刷新
Subject: BackPort of JDK-8336346: Fix -Wzero-as-null-pointer-constant warnings in jvmciJavaClasses.cpp
---
src/hotspot/share/jvmci/jvmciJavaClasses.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/hotspot/share/jvmci/jvmciJavaClasses.cpp b/src/hotspot/share/jvmci/jvmciJavaClasses.cpp
index 4346c4050..94229dcb3 100644
--- a/src/hotspot/share/jvmci/jvmciJavaClasses.cpp
+++ b/src/hotspot/share/jvmci/jvmciJavaClasses.cpp
@@ -581,7 +581,7 @@ void JNIJVMCI::register_natives(JNIEnv* env) {
#define EMPTY2(x,y)
#define FIELD3(className, name, sig) FIELD2(className, name)
#define FIELD2(className, name) \
- jfieldID JNIJVMCI::className::_##name##_field_id = 0; \
+ jfieldID JNIJVMCI::className::_##name##_field_id = nullptr; \
int HotSpotJVMCI::className::_##name##_offset = 0;
#define METHOD(jniCallType, jniGetMethod, hsCallType, returnType, className, methodName, signatureSymbolName, args)
#define CONSTRUCTOR(className, signature)
@@ -623,7 +623,7 @@ JVMCI_CLASSES_DO(EMPTY2, EMPTY0, FIELD2, FIELD2, FIELD2, FIELD2, FIELD2, FIELD3,
void JNIJVMCI::className::check(JVMCIEnv* jvmciEnv, JVMCIObject obj, const char* field_name, jfieldID offset) { \
assert(obj.is_non_null(), "null field access of %s.%s", #className, field_name); \
assert(jvmciEnv->isa_##className(obj), "wrong class, " #className " expected, found %s", jvmciEnv->klass_name(obj)); \
- assert(offset != 0, "must be valid offset"); \
+ assert(offset != nullptr, "must be valid offset"); \
} \
jclass JNIJVMCI::className::_class = nullptr;
--
2.33.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。