From c6d2315315a77b62a9d6add8414aeda81641d37c Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 4 Jun 2020 15:49:38 -0700 Subject: [PATCH] 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 --- upb/decode.c | 2 +- upb/msg.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/upb/decode.c b/upb/decode.c index cecd68a8e74..d1eec474dfd 100644 --- a/upb/decode.c +++ b/upb/decode.c @@ -222,7 +222,7 @@ static void decode_munge(int type, wireval *val) { static const upb_msglayout_field *upb_find_field(const upb_msglayout *l, 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. */ int i; diff --git a/upb/msg.h b/upb/msg.h index 1ded2cf3e25..b321748ec05 100644 --- a/upb/msg.h +++ b/upb/msg.h @@ -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_ASSERT(f->presence < 0); - return ~(int64_t)f->presence; + return ~(ptrdiff_t)f->presence; } UPB_INLINE uint32_t *_upb_oneofcase_field(upb_msg *msg,