From 2825f867bb38a6523f4d41920cc492c7f529c070 Mon Sep 17 00:00:00 2001 From: Esun Kim Date: Fri, 26 Jul 2019 15:05:48 -0700 Subject: Remove conversion warning --- upb/generated_util.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'upb/generated_util.h') diff --git a/upb/generated_util.h b/upb/generated_util.h index a0b3e8d..234bcda 100644 --- a/upb/generated_util.h +++ b/upb/generated_util.h @@ -87,11 +87,11 @@ UPB_INLINE bool _upb_has_field(const void *msg, size_t idx) { } UPB_INLINE bool _upb_sethas(const void *msg, size_t idx) { - return (*PTR_AT(msg, idx / 8, char)) |= (1 << (idx % 8)); + return (*PTR_AT(msg, idx / 8, char)) |= (char)(1 << (idx % 8)); } UPB_INLINE bool _upb_clearhas(const void *msg, size_t idx) { - return (*PTR_AT(msg, idx / 8, char)) &= ~(1 << (idx % 8)); + return (*PTR_AT(msg, idx / 8, char)) &= (char)(~(1 << (idx % 8))); } UPB_INLINE bool _upb_has_oneof_field(const void *msg, size_t case_ofs, int32_t num) { -- cgit v1.2.3