Fix misc warnings
Fixes https://github.com/behdad/harfbuzz/pull/51
diff --git a/src/hb-buffer-deserialize-json.rl b/src/hb-buffer-deserialize-json.rl
index 7351b2a..91b350f 100644
--- a/src/hb-buffer-deserialize-json.rl
+++ b/src/hb-buffer-deserialize-json.rl
@@ -117,8 +117,8 @@
const char *tok = NULL;
int cs;
- hb_glyph_info_t info;
- hb_glyph_position_t pos;
+ hb_glyph_info_t info = {0};
+ hb_glyph_position_t pos = {0};
%%{
write init;
write exec;
diff --git a/src/hb-ot-layout-gsub-table.hh b/src/hb-ot-layout-gsub-table.hh
index 2b421a9..7d6a5a7 100644
--- a/src/hb-ot-layout-gsub-table.hh
+++ b/src/hb-ot-layout-gsub-table.hh
@@ -200,7 +200,7 @@
TRACE_SERIALIZE (this);
if (unlikely (!c->extend_min (u.format))) return TRACE_RETURN (false);
unsigned int format = 2;
- int delta;
+ int delta = 0;
if (num_glyphs) {
format = 1;
/* TODO(serialize) check for wrap-around */
diff --git a/src/hb-private.hh b/src/hb-private.hh
index cac021a..40d02ea 100644
--- a/src/hb-private.hh
+++ b/src/hb-private.hh
@@ -951,12 +951,12 @@
struct hb_options_t
{
- int initialized : 1;
- int uniscribe_bug_compatible : 1;
+ unsigned int initialized : 1;
+ unsigned int uniscribe_bug_compatible : 1;
};
union hb_options_union_t {
- int i;
+ unsigned int i;
hb_options_t opts;
};
ASSERT_STATIC (sizeof (int) == sizeof (hb_options_union_t));