From 1080117f2b64a7a9f00fca65365c04762c2e915b Mon Sep 17 00:00:00 2001 From: Bo Yang Date: Thu, 14 Jun 2018 20:03:20 +0000 Subject: Revert "Prepare upb_value for encoding/decoding map." This reverts commit f30dd0ff0cead9bb1f8f3b1b295392d75705486b. --- upb/msg.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'upb/msg.c') diff --git a/upb/msg.c b/upb/msg.c index a045102..527587f 100644 --- a/upb/msg.c +++ b/upb/msg.c @@ -95,12 +95,16 @@ static uint8_t upb_msg_fielddefsize(const upb_fielddef *f) { * pointer to that in the tables for extensions/maps. */ static upb_value upb_toval(upb_msgval val) { upb_value ret; - ret.val = val; + UPB_UNUSED(val); + memset(&ret, 0, sizeof(upb_value)); /* XXX */ return ret; } static upb_msgval upb_msgval_fromval(upb_value val) { - return val.val; + upb_msgval ret; + UPB_UNUSED(val); + memset(&ret, 0, sizeof(upb_msgval)); /* XXX */ + return ret; } static upb_ctype_t upb_fieldtotabtype(upb_fieldtype_t type) { -- cgit v1.2.3