Squashed 'third_party/upb/' changes from b717575cef..363e39c171

363e39c171 Fix for extra compiler warnings. (#290)

git-subtree-dir: third_party/upb
git-subtree-split: 363e39c171a08b89bd546189d1244a6e191cacf0
pull/23168/head
Mark D. Roth 5 years ago
parent a7aa780691
commit c6d2315315
  1. 2
      upb/decode.c
  2. 2
      upb/msg.h

@ -222,7 +222,7 @@ static void decode_munge(int type, wireval *val) {
static const upb_msglayout_field *upb_find_field(const upb_msglayout *l, static const upb_msglayout_field *upb_find_field(const upb_msglayout *l,
uint32_t field_number) { uint32_t field_number) {
static upb_msglayout_field none = {0}; static upb_msglayout_field none = {0, 0, 0, 0, 0, 0};
/* Lots of optimization opportunities here. */ /* Lots of optimization opportunities here. */
int i; int i;

@ -141,7 +141,7 @@ UPB_INLINE uint32_t _upb_getoneofcase(const void *msg, size_t case_ofs) {
UPB_INLINE size_t _upb_oneofcase_ofs(const upb_msglayout_field *f) { UPB_INLINE size_t _upb_oneofcase_ofs(const upb_msglayout_field *f) {
UPB_ASSERT(f->presence < 0); UPB_ASSERT(f->presence < 0);
return ~(int64_t)f->presence; return ~(ptrdiff_t)f->presence;
} }
UPB_INLINE uint32_t *_upb_oneofcase_field(upb_msg *msg, UPB_INLINE uint32_t *_upb_oneofcase_field(upb_msg *msg,

Loading…
Cancel
Save