Skip to content

Commit 5bfb82e

Browse files
committedAug 14, 2023
8314119: G1: Fix -Wconversion warnings in G1CardSetInlinePtr::card_pos_for
Reviewed-by: tschatzl, kbarrett
1 parent 06aa3c5 commit 5bfb82e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
 

‎src/hotspot/share/gc/g1/g1CardSetContainers.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class G1CardSetInlinePtr : public StackObj {
7878

7979
static const uintptr_t SizeFieldMask = (((uint)1 << SizeFieldLen) - 1) << SizeFieldPos;
8080

81-
static uint8_t card_pos_for(uint const idx, uint const bits_per_card) {
81+
static uint card_pos_for(uint const idx, uint const bits_per_card) {
8282
return (idx * bits_per_card + HeaderSize);
8383
}
8484

‎src/hotspot/share/gc/g1/g1CardSetContainers.inline.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ inline G1CardSetInlinePtr::ContainerPtr G1CardSetInlinePtr::merge(ContainerPtr o
3535
assert((idx & (SizeFieldMask >> SizeFieldPos)) == idx, "Index %u too large to fit into size field", idx);
3636
assert(card_in_region < ((uint)1 << bits_per_card), "Card %u too large to fit into card value field", card_in_region);
3737

38-
uint8_t card_pos = card_pos_for(idx, bits_per_card);
38+
uint card_pos = card_pos_for(idx, bits_per_card);
3939
assert(card_pos + bits_per_card < BitsInValue, "Putting card at pos %u with %u bits would extend beyond pointer", card_pos, bits_per_card);
4040

4141
// Check that we do not touch any fields we do not own.

0 commit comments

Comments
 (0)
Please sign in to comment.