diff --git a/src/hb-buffer-serialize.cc b/src/hb-buffer-serialize.cc index b32092cf0..4541db23b 100644 --- a/src/hb-buffer-serialize.cc +++ b/src/hb-buffer-serialize.cc @@ -146,9 +146,9 @@ _hb_buffer_serialize_glyphs_json (hb_buffer_t *buffer, *p++ = '}'; - if (buf_size > (p - b)) + unsigned int l = p - b; + if (buf_size > l) { - unsigned int l = p - b; memcpy (buf, b, l); buf += l; buf_size -= l; @@ -208,9 +208,9 @@ _hb_buffer_serialize_glyphs_text (hb_buffer_t *buffer, p += MAX (0, snprintf (p, ARRAY_LENGTH (b) - (p - b), ",%d", pos[i].y_advance)); } - if (buf_size > (p - b)) + unsigned int l = p - b; + if (buf_size > l) { - unsigned int l = p - b; memcpy (buf, b, l); buf += l; buf_size -= l; diff --git a/src/hb-ot-map.cc b/src/hb-ot-map.cc index 17dc934e2..559193c1b 100644 --- a/src/hb-ot-map.cc +++ b/src/hb-ot-map.cc @@ -181,7 +181,7 @@ hb_ot_map_builder_t::compile (hb_ot_map_t &m) continue; /* Feature disabled, or not enough bits. */ - bool found = false; + hb_bool_t found = false; unsigned int feature_index[2]; for (unsigned int table_index = 0; table_index < 2; table_index++) found |= hb_ot_layout_language_find_feature (face,