Skip to content

Commit

Permalink
Fix cppcheck warning
Browse files Browse the repository at this point in the history
  • Loading branch information
uweseimet committed Jan 15, 2025
1 parent 04da551 commit fb2e35b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cpp/s2pdump/s2pdump_executor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ void S2pDumpExecutor::SetInt24(span<uint8_t> buf, int offset, int value)
{
assert(buf.size() > static_cast<size_t>(offset) + 2);

buf[offset] = static_cast<uint8_t>(value >> 16);
buf[offset + 1] = static_cast<uint8_t>(value >> 8);
buf[offset] = static_cast<uint8_t>(static_cast<uint32_t>(value) >> 16);
buf[offset + 1] = static_cast<uint8_t>(static_cast<uint32_t>(value) >> 8);
buf[offset + 2] = static_cast<uint8_t>(value);
}

0 comments on commit fb2e35b

Please sign in to comment.