diff --git a/src/hb-ot-layout-gpos-table.hh b/src/hb-ot-layout-gpos-table.hh index 625170777..bc8a5fd6b 100644 --- a/src/hb-ot-layout-gpos-table.hh +++ b/src/hb-ot-layout-gpos-table.hh @@ -262,7 +262,7 @@ struct AnchorFormat2 hb_font_t *font = c->font; unsigned int x_ppem = font->x_ppem; unsigned int y_ppem = font->y_ppem; - hb_position_t cx, cy; + hb_position_t cx = 0, cy = 0; hb_bool_t ret; ret = (x_ppem || y_ppem) && diff --git a/src/hb-ot-shape-normalize.cc b/src/hb-ot-shape-normalize.cc index 62cbb9de9..eceea9e64 100644 --- a/src/hb-ot-shape-normalize.cc +++ b/src/hb-ot-shape-normalize.cc @@ -119,7 +119,7 @@ skip_char (hb_buffer_t *buffer) static inline unsigned int decompose (const hb_ot_shape_normalize_context_t *c, bool shortest, hb_codepoint_t ab) { - hb_codepoint_t a, b, a_glyph, b_glyph; + hb_codepoint_t a = 0, b = 0, a_glyph = 0, b_glyph = 0; hb_buffer_t * const buffer = c->buffer; hb_font_t * const font = c->font; @@ -164,7 +164,7 @@ decompose_current_character (const hb_ot_shape_normalize_context_t *c, bool shor { hb_buffer_t * const buffer = c->buffer; hb_codepoint_t u = buffer->cur().codepoint; - hb_codepoint_t glyph; + hb_codepoint_t glyph = 0; if (shortest && c->font->get_nominal_glyph (u, &glyph)) { diff --git a/util/view-cairo.cc b/util/view-cairo.cc index f4f2bc506..e8e334beb 100644 --- a/util/view-cairo.cc +++ b/util/view-cairo.cc @@ -49,7 +49,7 @@ view_cairo_t::render (const font_options_t *font_opts) double leading = font_height + view_options.line_space; /* Calculate surface size. */ - double w, h; + double w = 0, h = 0; (vertical ? w : h) = (int) lines->len * leading - view_options.line_space; (vertical ? h : w) = 0; for (unsigned int i = 0; i < lines->len; i++) {