From d0558cfd936cd89ca879d2e7be0760d010ed8699 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 17 Sep 2021 19:34:55 -0400 Subject: renderer: Fix static analysis warnings Fix a warnings about garbage values that are showing up in the gtk static-scan build. --- pango/pango-renderer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pango/pango-renderer.c b/pango/pango-renderer.c index d47ba13a..b3b70549 100644 --- a/pango/pango-renderer.c +++ b/pango/pango-renderer.c @@ -575,7 +575,7 @@ pango_renderer_draw_layout_line (PangoRenderer *renderer, { int x_off = 0; int glyph_string_width; - LineState state; + LineState state = { 0, }; GSList *l; gboolean got_overall = FALSE; PangoRectangle overall_rect; -- cgit v1.2.1 From 1f6bd846b6b2cf242e1af263963544bf4e4a5054 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 17 Sep 2021 19:36:46 -0400 Subject: layout: Fix static analysis warnings These were showing up as warnings about garbage values in the gtk static-scan build. --- pango/pango-layout.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pango/pango-layout.c b/pango/pango-layout.c index 21e2c9c6..74799ddc 100644 --- a/pango/pango-layout.c +++ b/pango/pango-layout.c @@ -2387,8 +2387,8 @@ pango_layout_index_to_pos (PangoLayout *layout, int index, PangoRectangle *pos) { - PangoRectangle line_logical_rect; - PangoRectangle run_logical_rect; + PangoRectangle line_logical_rect = { 0, }; + PangoRectangle run_logical_rect = { 0, }; PangoLayoutIter iter; PangoLayoutLine *layout_line = NULL; int x_pos; @@ -4480,8 +4480,8 @@ pango_layout_check_lines (PangoLayout *layout) state.line_height = -1; if (layout->height >= 0) { - PangoRectangle logical; - int height; + PangoRectangle logical = { 0, }; + int height = 0; pango_layout_get_empty_extents_and_height_at_index (layout, 0, &logical, &height); state.line_height = layout->line_spacing == 0.0 ? logical.height : layout->line_spacing * height; } -- cgit v1.2.1