summaryrefslogtreecommitdiff
path: root/tests/test-layout.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2015-07-17 20:36:47 -0400
committerMatthias Clasen <mclasen@redhat.com>2015-07-17 20:39:13 -0400
commitee36b26eddcbbc169660de188b4804e21194c530 (patch)
treee317cdc231170c97df78eb223fae11325984ca17 /tests/test-layout.c
parent65214f2c8a7e968ed2bc6d9cc66fecbc5de7c0f5 (diff)
downloadpango-ee36b26eddcbbc169660de188b4804e21194c530.tar.gz
Silence a few coverity warnings
coverity says: Using uninitialized value "index2". It didn't notice that the only time we can reach the index = index2 assignment with index2 still uninitialized is when we are never going to look at index again.
Diffstat (limited to 'tests/test-layout.c')
-rw-r--r--tests/test-layout.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/test-layout.c b/tests/test-layout.c
index 62333c1f..75af21bd 100644
--- a/tests/test-layout.c
+++ b/tests/test-layout.c
@@ -94,6 +94,7 @@ dump_lines (PangoLayout *layout, GString *string)
has_more = TRUE;
index = pango_layout_iter_get_index (iter);
+ index2 = 0;
i = 0;
while (has_more)
{
@@ -132,13 +133,14 @@ dump_runs (PangoLayout *layout, GString *string)
gboolean has_more;
gchar *char_str;
gint i;
- gchar *font;
+ gchar *font = 0;
text = pango_layout_get_text (layout);
iter = pango_layout_get_iter (layout);
has_more = TRUE;
index = pango_layout_iter_get_index (iter);
+ index2 = 0;
i = 0;
while (has_more)
{