Skip to content

Commit

Permalink
8314274: G1: Fix -Wconversion warnings around G1CardSetArray::_data
Browse files Browse the repository at this point in the history
Reviewed-by: kbarrett, tschatzl
  • Loading branch information
albertnetymk committed Aug 22, 2023
1 parent eb06572 commit 32bf468
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/hotspot/share/gc/g1/g1CardSetContainers.inline.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ inline G1CardSetArray::G1CardSetArray(uint card_in_region, EntryCountType num_ca
_num_entries(1) {
assert(_size > 0, "CardSetArray of size 0 not supported.");
assert(_size < LockBitMask, "Only support CardSetArray of size %u or smaller.", LockBitMask - 1);
_data[0] = card_in_region;
_data[0] = checked_cast<EntryDataType>(card_in_region);
}

inline G1CardSetArray::G1CardSetArrayLocker::G1CardSetArrayLocker(EntryCountType volatile* num_entries_addr) :
Expand Down Expand Up @@ -195,7 +195,7 @@ inline G1AddCardResult G1CardSetArray::add(uint card_idx) {
return Overflow;
}

_data[num_entries] = card_idx;
_data[num_entries] = checked_cast<EntryDataType>(card_idx);

x.inc_num_entries();

Expand Down

1 comment on commit 32bf468

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.