summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-09-17 19:36:46 -0400
committerMatthias Clasen <mclasen@redhat.com>2021-09-17 19:36:46 -0400
commit1f6bd846b6b2cf242e1af263963544bf4e4a5054 (patch)
tree95314ae3b2e6c944dd011621f988e1718f16129d
parentd0558cfd936cd89ca879d2e7be0760d010ed8699 (diff)
downloadpango-1f6bd846b6b2cf242e1af263963544bf4e4a5054.tar.gz
layout: Fix static analysis warnings
These were showing up as warnings about garbage values in the gtk static-scan build.
-rw-r--r--pango/pango-layout.c8
1 files 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;
}