RFR: 8314932: G1: Fix -Wconversion warnings for simple cases inside g1 folder

Thomas Schatzl tschatzl at openjdk.org
Thu Aug 24 10:53:27 UTC 2023


On Thu, 24 Aug 2023 08:57:50 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

> Simple dropping of conversions in miscellaneous places.
> 
> (I include all of them in one PR, because I think reviewing them requires local reasoning. There are other more complex conversions in g1 folder, which require their own PRs.)
> 
> Test: tier1-5

lgtm, please remove that unused method before pushing.

src/hotspot/share/gc/g1/g1BlockOffsetTable.inline.hpp line 49:

> 47:   size_t index = _bot->index_for(addr);
> 48: 
> 49:   u_char offset = _bot->offset_array(index);

pre-existing: the offset array base type should probably be `uint8_t`, not `u_char`, but that's a cleanup for another CR.

src/hotspot/share/gc/g1/g1PageBasedVirtualSpace.cpp line 105:

> 103: size_t G1PageBasedVirtualSpace::addr_to_page_index(char* addr) const {
> 104:   return pointer_delta(addr, _low_boundary, _page_size);
> 105: }

I think the method is unused and can be removed (couldn't find it being referenced using 'grep')

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

Marked as reviewed by tschatzl (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/15413#pullrequestreview-1593245945
PR Review Comment: https://git.openjdk.org/jdk/pull/15413#discussion_r1304108327
PR Review Comment: https://git.openjdk.org/jdk/pull/15413#discussion_r1304115537


More information about the hotspot-gc-dev mailing list