Fix misc warnings
authorBehdad Esfahbod <behdad@behdad.org>
Wed, 15 Oct 2014 03:07:31 +0000 (20:07 -0700)
committerBehdad Esfahbod <behdad@behdad.org>
Wed, 15 Oct 2014 03:07:31 +0000 (20:07 -0700)
Fixes https://github.com/behdad/harfbuzz/pull/51

src/hb-buffer-deserialize-json.rl
src/hb-ot-layout-gsub-table.hh
src/hb-private.hh

index 7351b2a..91b350f 100644 (file)
@@ -117,8 +117,8 @@ _hb_buffer_deserialize_glyphs_json (hb_buffer_t *buffer,
 
   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;
index 2b421a9..7d6a5a7 100644 (file)
@@ -200,7 +200,7 @@ struct SingleSubst
     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 */
index cac021a..40d02ea 100644 (file)
@@ -951,12 +951,12 @@ hb_codepoint_parse (const char *s, unsigned int len, int base, hb_codepoint_t *o
 
 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));