mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-08 17:38:38 +00:00
8263396: Atomic::CmpxchgByteUsingInt::set_byte_in_int needs an explicit cast
Reviewed-by: dholmes
This commit is contained in:
parent
07ecd421d1
commit
eb8db12ce6
@ -818,7 +818,8 @@ inline uint32_t Atomic::CmpxchgByteUsingInt::set_byte_in_int(uint32_t n,
|
||||
uint8_t b,
|
||||
uint32_t idx) {
|
||||
int bitsIdx = BitsPerByte * idx;
|
||||
return (n & ~(0xff << bitsIdx)) | (b << bitsIdx);
|
||||
return (n & ~(static_cast<uint32_t>(0xff) << bitsIdx))
|
||||
| (static_cast<uint32_t>(b) << bitsIdx);
|
||||
}
|
||||
|
||||
inline uint8_t Atomic::CmpxchgByteUsingInt::get_byte_in_int(uint32_t n,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user