8338019: Fix simple -Wzero-as-null-pointer-constant warnings in riscv code

Reviewed-by: fyang, mli, luhenry
This commit is contained in:
Gui Cao 2024-08-09 02:59:37 +00:00 committed by Fei Yang
parent 55c509708e
commit 0c1e9111d2
4 changed files with 5 additions and 5 deletions

@ -542,7 +542,7 @@ void LIR_Assembler::const2mem(LIR_Opr src, LIR_Opr dest, BasicType type, CodeEmi
insn = &MacroAssembler::sw; break;
case T_OBJECT: // fall through
case T_ARRAY:
assert(c->as_jobject() == 0, "should be");
assert(c->as_jobject() == nullptr, "should be");
if (UseCompressedOops && !wide) {
insn = &MacroAssembler::sw;
} else {

@ -1066,4 +1066,4 @@ OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) {
#undef __
const char *Runtime1::pd_name_for_address(address entry) { Unimplemented(); return 0; }
const char *Runtime1::pd_name_for_address(address entry) { Unimplemented(); }

@ -269,7 +269,7 @@ void frame::patch_pc(Thread* thread, address pc) {
// Either the return address is the original one or we are going to
// patch in the same address that's already there.
assert(_pc == pc_old || pc == pc_old || pc_old == 0, "must be");
assert(_pc == pc_old || pc == pc_old || pc_old == nullptr, "must be");
DEBUG_ONLY(address old_pc = _pc;)
*pc_addr = pc;
_pc = pc; // must be set before call to get_deopt_original_pc

@ -685,7 +685,7 @@ address NativeJump::jump_destination() const {
// load
// return -1 if jump to self or to 0
if ((dest == (address) this) || dest == 0) {
if ((dest == (address) this) || dest == nullptr) {
dest = (address) -1;
}
@ -714,7 +714,7 @@ address NativeGeneralJump::jump_destination() const {
// a general jump
// return -1 if jump to self or to 0
if ((dest == (address) this) || dest == 0) {
if ((dest == (address) this) || dest == nullptr) {
dest = (address) -1;
}