diff --git a/runtime/asm_defines/asm_defines.def b/runtime/asm_defines/asm_defines.def index 8710c1bddd7cb1c37c0d10cb343b6a9ec1d5501a..dd5b427c7d7d6b4306e88eb112c96e086065e9d2 100644 --- a/runtime/asm_defines/asm_defines.def +++ b/runtime/asm_defines/asm_defines.def @@ -52,7 +52,7 @@ DEFINE_VALUE(CALLEE_SAVED_SIZE, (GetCalleeRegsCount(RUNTIME_ARCH, false) + GetCa DEFINE_VALUE(BRIDGE_FRAME_SIZE, AlignUp( (CFrameFlags::End() + static_cast(GetCalleeRegsCount(RUNTIME_ARCH, false) + GetCalleeRegsCount(RUNTIME_ARCH, true))) * - PointerSize(RUNTIME_ARCH), + static_cast(PointerSize(RUNTIME_ARCH)), 16)) DEFINE_VALUE(CALLER_REG0_OFFSET, (CFrameLayout(RUNTIME_ARCH, 0).GetCallerRegsStartSlot() + diff --git a/runtime/stack_walker.cpp b/runtime/stack_walker.cpp index 414250c790e98da7635dd5df2fc90273ee66adb8..814bb884577d69aded02fed5f910e9334e76066c 100644 --- a/runtime/stack_walker.cpp +++ b/runtime/stack_walker.cpp @@ -134,7 +134,7 @@ void StackWalker::InitCalleeBuffer(SlotType *callee_stack, CalleeStorage *prev_c if (prev_callees == nullptr || prev_is_jni || (prev_callees->callee_fp_regs_mask & (1U << reg)) != 0) { callee_stack_.stack[offset] = // NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-pointer-arithmetic) - start_slot + (callee_vregs_count - Popcount(callee_stack_.callee_fp_regs_mask >> reg)); + start_slot + (callee_vregs_count - static_cast(Popcount(callee_stack_.callee_fp_regs_mask >> reg))); } else { callee_stack_.stack[offset] = prev_callees->stack[offset]; } diff --git a/verification/util/bit_vector.h b/verification/util/bit_vector.h index 8e3a0eba7b2c884cf64718b9447f2c7bb530be0a..0c8d8c7c3bca5466e7eb4f22c5c15cbc836bd461 100644 --- a/verification/util/bit_vector.h +++ b/verification/util/bit_vector.h @@ -530,7 +530,7 @@ public: bool last_word_partially_filled = ((size() & POS_MASK) == 0) ? false : true; if (size_in_words() > 0) { for (; pos < (size_in_words() - (last_word_partially_filled ? 1 : 0)); ++pos) { - result += panda::Popcount(data_[pos]); + result += static_cast(panda::Popcount(data_[pos])); } } if (last_word_partially_filled) { @@ -559,12 +559,12 @@ public: if (sz > 0) { for (; pos < (sz - (last_word_partially_filled ? 1 : 0)); ++pos) { auto val = get_processed_word(pos); - result += panda::Popcount(val); + result += static_cast(panda::Popcount(val)); } } if (last_word_partially_filled) { const Word MASK = MaskUpToIndex(size & POS_MASK); - result += panda::Popcount(get_processed_word(pos) & MASK); + result += static_cast(panda::Popcount(get_processed_word(pos) & MASK)); } return result; } diff --git a/verification/util/saturated_enum.h b/verification/util/saturated_enum.h index f75c564577f0a3ca0910427d7be4d26eb67a766f..45ca71fb8b8ac9bf3c7bcd6e5298c3dc68a5ece0 100644 --- a/verification/util/saturated_enum.h +++ b/verification/util/saturated_enum.h @@ -85,7 +85,7 @@ protected: template void Enumerate(Handler &&handler, bool prev_set) const { - prev_set |= value_ == E; + prev_set = prev_set || (value_ == E); if (prev_set) { handler(E); }