8335663: Fix simple -Wzero-as-null-pointer-constant warnings in C2 code

Reviewed-by: jwaters, chagedorn
This commit is contained in:
Kim Barrett 2024-07-04 10:04:52 +00:00
parent 0bb9c76288
commit cf1be87279
4 changed files with 7 additions and 7 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -281,7 +281,7 @@ public:
_succs(a),
_num_succs(0),
_pre_order(0),
_idom(0),
_idom(nullptr),
_loop(nullptr),
_reg_pressure(0),
_ihrp_index(1),

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -238,7 +238,7 @@ public:
int is_diamond_phi() const;
bool try_clean_memory_phi(PhaseIterGVN* igvn);
virtual int Opcode() const;
virtual bool pinned() const { return in(0) != 0; }
virtual bool pinned() const { return in(0) != nullptr; }
virtual const TypePtr *adr_type() const { verify_adr_type(true); return _adr_type; }
void set_inst_mem_id(int inst_mem_id) { _inst_mem_id = inst_mem_id; }

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -50,7 +50,7 @@ public:
bool _can_be_reused; // true (default) if the value can be shared with other users.
public:
Constant() : _type(T_ILLEGAL), _is_array(false), _alignment(-1), _offset(-1), _freq(0.0f), _can_be_reused(true) { _v._value.l = 0; }
Constant() : _type(T_ILLEGAL), _is_array(false), _alignment(-1), _offset(-1), _freq(0.0f), _can_be_reused(true) { _v._value.l = nullptr; }
Constant(BasicType type, jvalue value, float freq = 0.0f, bool can_be_reused = true) :
_type(type),
_is_array(false),

View File

@ -1084,7 +1084,7 @@ public:
uint _block_num;
labelOper() : _label(0), _block_num(0) {}
labelOper() : _label(nullptr), _block_num(0) {}
labelOper(Label* label, uint block_num) : _label(label), _block_num(block_num) {}