提交 eaf64945 编写于 作者: E Ebrahim Byagowi 提交者: Behdad Esfahbod

Resolve clang's conditional-uninitialize warnings

上级 8b0d642e
...@@ -262,7 +262,7 @@ struct AnchorFormat2 ...@@ -262,7 +262,7 @@ struct AnchorFormat2
hb_font_t *font = c->font; hb_font_t *font = c->font;
unsigned int x_ppem = font->x_ppem; unsigned int x_ppem = font->x_ppem;
unsigned int y_ppem = font->y_ppem; unsigned int y_ppem = font->y_ppem;
hb_position_t cx, cy; hb_position_t cx = 0, cy = 0;
hb_bool_t ret; hb_bool_t ret;
ret = (x_ppem || y_ppem) && ret = (x_ppem || y_ppem) &&
......
...@@ -119,7 +119,7 @@ skip_char (hb_buffer_t *buffer) ...@@ -119,7 +119,7 @@ skip_char (hb_buffer_t *buffer)
static inline unsigned int static inline unsigned int
decompose (const hb_ot_shape_normalize_context_t *c, bool shortest, hb_codepoint_t ab) 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_buffer_t * const buffer = c->buffer;
hb_font_t * const font = c->font; hb_font_t * const font = c->font;
...@@ -164,7 +164,7 @@ decompose_current_character (const hb_ot_shape_normalize_context_t *c, bool shor ...@@ -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_buffer_t * const buffer = c->buffer;
hb_codepoint_t u = buffer->cur().codepoint; 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)) if (shortest && c->font->get_nominal_glyph (u, &glyph))
{ {
......
...@@ -49,7 +49,7 @@ view_cairo_t::render (const font_options_t *font_opts) ...@@ -49,7 +49,7 @@ view_cairo_t::render (const font_options_t *font_opts)
double leading = font_height + view_options.line_space; double leading = font_height + view_options.line_space;
/* Calculate surface size. */ /* Calculate surface size. */
double w, h; double w = 0, h = 0;
(vertical ? w : h) = (int) lines->len * leading - view_options.line_space; (vertical ? w : h) = (int) lines->len * leading - view_options.line_space;
(vertical ? h : w) = 0; (vertical ? h : w) = 0;
for (unsigned int i = 0; i < lines->len; i++) { for (unsigned int i = 0; i < lines->len; i++) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册