Integrated: 8316907: Fix nonnull-compare warnings

Daniel Jeliński djelinski at openjdk.org
Mon Oct 2 10:04:49 UTC 2023


On Tue, 26 Sep 2023 14:23:21 GMT, Daniel Jeliński <djelinski at openjdk.org> wrote:

> Please review this patch that fixes nonnull-compare warnings emitted by GCC after removing `-fno-delete-null-pointer-checks`.
> 
> The changes are pretty straightforward:
> - removal of `assert(this)` only changes the behavior of debug code; assertion failure in that place would result in a crash later on,
> - the check in `CodeBuffer::print` is a bit more complex to review; fortunately all uses except [`print_buf_locs`](https://github.com/openjdk/jdk/blob/1f7dfda7059f9dc14bff61b3c77d769ade85557d/src/hotspot/share/code/relocInfo.cpp#L990) are in CodeBuffer, and `print_buf_locs` is only used by developers from debugger.
> 
> I verified tier1-5 tests, just in case. No new failures.

This pull request has now been integrated.

Changeset: 516cfb13
Author:    Daniel Jeliński <djelinski at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/516cfb135f7e5fefaf6e6f2928f6ecb88806f1ef
Stats:     6 lines in 2 files changed: 0 ins; 6 del; 0 mod

8316907: Fix nonnull-compare warnings

Reviewed-by: kbarrett, jsjolen

-------------

PR: https://git.openjdk.org/jdk/pull/15927


More information about the hotspot-compiler-dev mailing list