Commit d7cb5b44 authored by David Renshaw's avatar David Renshaw

cast to unsigned integer before performing left shift

parent 7a7c4007
...@@ -158,7 +158,7 @@ struct WirePointer { ...@@ -158,7 +158,7 @@ struct WirePointer {
reinterpret_cast<uintptr_t>(segment->getStartPtr())); reinterpret_cast<uintptr_t>(segment->getStartPtr()));
KJ_DREQUIRE(reinterpret_cast<uintptr_t>(target) <= KJ_DREQUIRE(reinterpret_cast<uintptr_t>(target) <=
reinterpret_cast<uintptr_t>(segment->getStartPtr() + segment->getSize())); reinterpret_cast<uintptr_t>(segment->getStartPtr() + segment->getSize()));
offsetAndKind.set(((target - reinterpret_cast<word*>(this) - 1) << 2) | kind); offsetAndKind.set((static_cast<uint32_t>(target - reinterpret_cast<word*>(this) - 1) << 2) | kind);
} }
KJ_ALWAYS_INLINE(void setKindWithZeroOffset(Kind kind)) { KJ_ALWAYS_INLINE(void setKindWithZeroOffset(Kind kind)) {
offsetAndKind.set(kind); offsetAndKind.set(kind);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment