Explicit casting to avoid 64 to 32 bit conversion clang warning

PiperOrigin-RevId: 449833676
pull/13171/head
Protobuf Team 3 years ago committed by Copybara-Service
parent 12efc9b096
commit 285474d8e1
  1. 4
      upb/upb.h

@ -351,8 +351,8 @@ UPB_INLINE uint64_t _upb_BigEndian_Swap64(uint64_t val) {
if (_upb_IsLittleEndian()) { if (_upb_IsLittleEndian()) {
return val; return val;
} else { } else {
return ((uint64_t)_upb_BigEndian_Swap32(val) << 32) | return ((uint64_t)_upb_BigEndian_Swap32((uint32_t)val) << 32) |
_upb_BigEndian_Swap32(val >> 32); _upb_BigEndian_Swap32((uint32_t)(val >> 32));
} }
} }

Loading…
Cancel
Save