Fixed some c89 errors.

pull/13171/head
Josh Haberman 6 years ago
parent 340bd01338
commit 4a7bc85d72
  1. 2
      upb/decode.c
  2. 2
      upb/encode.c

@ -224,8 +224,8 @@ static upb_array *upb_getorcreatearr(upb_decframe *frame,
static void upb_sethasbit(upb_decframe *frame,
const upb_msglayout_field *field) {
UPB_ASSERT(field->presence > 0);
int32_t hasbit = field->presence;
UPB_ASSERT(field->presence > 0);
frame->msg[hasbit / 8] |= (1 << (hasbit % 8));
}

@ -134,8 +134,8 @@ static uint32_t upb_readcase(const char *msg, const upb_msglayout_field *f) {
}
static bool upb_readhasbit(const char *msg, const upb_msglayout_field *f) {
UPB_ASSERT(f->presence > 0);
uint32_t hasbit = f->presence;
UPB_ASSERT(f->presence > 0);
return msg[hasbit / 8] & (1 << (hasbit % 8));
}

Loading…
Cancel
Save