8314119: G1: Fix -Wconversion warnings in G1CardSetInlinePtr::card_pos_for
Reviewed-by: tschatzl, kbarrett
This commit is contained in:
parent
06aa3c5628
commit
5bfb82e6fa
@ -78,7 +78,7 @@ class G1CardSetInlinePtr : public StackObj {
|
||||
|
||||
static const uintptr_t SizeFieldMask = (((uint)1 << SizeFieldLen) - 1) << SizeFieldPos;
|
||||
|
||||
static uint8_t card_pos_for(uint const idx, uint const bits_per_card) {
|
||||
static uint card_pos_for(uint const idx, uint const bits_per_card) {
|
||||
return (idx * bits_per_card + HeaderSize);
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,7 @@ inline G1CardSetInlinePtr::ContainerPtr G1CardSetInlinePtr::merge(ContainerPtr o
|
||||
assert((idx & (SizeFieldMask >> SizeFieldPos)) == idx, "Index %u too large to fit into size field", idx);
|
||||
assert(card_in_region < ((uint)1 << bits_per_card), "Card %u too large to fit into card value field", card_in_region);
|
||||
|
||||
uint8_t card_pos = card_pos_for(idx, bits_per_card);
|
||||
uint card_pos = card_pos_for(idx, bits_per_card);
|
||||
assert(card_pos + bits_per_card < BitsInValue, "Putting card at pos %u with %u bits would extend beyond pointer", card_pos, bits_per_card);
|
||||
|
||||
// Check that we do not touch any fields we do not own.
|
||||
|
Loading…
Reference in New Issue
Block a user