From fec5a80b895750608370052f27b7fd2f4e9a327e Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Sat, 29 Sep 2018 16:20:08 +0200 Subject: [PATCH] Init bm MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Not sure why this became necessary though?! Fixes: Linking kitty/fast_data_types ... kitty/freetype.c: In function ‘render_glyphs_in_cells’: kitty/freetype.c:514:82: warning: ‘bm.right_edge’ may be used uninitialized in this function [-Wmaybe-uninitialized] if (num_cells > 1 && right_edge < canvas_width && (delta = (canvas_width - right_edge) / 2) && delta > 1) { ^ kitty/freetype.c:490:21: note: ‘bm.right_edge’ was declared here ProcessedBitmap bm; ^ --- kitty/freetype.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kitty/freetype.c b/kitty/freetype.c index 42229aa2f..e844d062f 100644 --- a/kitty/freetype.c +++ b/kitty/freetype.c @@ -487,7 +487,7 @@ render_glyphs_in_cells(PyObject *f, bool bold, bool italic, hb_glyph_info_t *inf Face *self = (Face*)f; bool is_emoji = *was_colored; *was_colored = is_emoji && self->has_color; float x = 0.f, y = 0.f, x_offset = 0.f; - ProcessedBitmap bm; + ProcessedBitmap bm = EMPTY_PBM; unsigned int canvas_width = cell_width * num_cells; for (unsigned int i = 0; i < num_glyphs; i++) { bm = EMPTY_PBM;