From 176fd17d02ac183af32a0e710ec32d25c9322021 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 30 Oct 2013 17:27:24 +0000 Subject: [PATCH] Bug 70971 - Signed/unsigned compiler warnings on windows Patch from Emil Eklund. --- src/hb-buffer-serialize.cc | 8 ++++---- src/hb-ot-map.cc | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) 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,