From d68515c164dde36f36096b35ee4293901df9cd2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Correa=20G=C3=B3mez?= Date: Thu, 18 May 2023 23:29:11 +0200 Subject: [PATCH] ev-page-accessible: silence maybe-uninitialized warnings Silence the following warnings, since the compiler does not have the warranty that start and end might have been set inside get_selection_bounds ../libview/ev-page-accessible.c: In function 'ev_page_accessible_get_selection': ../libview/ev-page-accessible.c:731:74: warning: 'start' may be used uninitialized [-Wmaybe-uninitialized] 731 | if (get_selection_bounds (view, selection, &start, &end) && start != end) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~ ../libview/ev-page-accessible.c:726:22: note: 'start' was declared here 726 | gint start, end; | ^~~~~ ../libview/ev-page-accessible.c:731:74: warning: 'end' may be used uninitialized [-Wmaybe-uninitialized] 731 | if (get_selection_bounds (view, selection, &start, &end) && start != end) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~ ../libview/ev-page-accessible.c:726:29: note: 'end' was declared here 726 | gint start, end; | ^~~ } } --- libview/ev-page-accessible.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libview/ev-page-accessible.c b/libview/ev-page-accessible.c index ed246d4b..85995b89 100644 --- a/libview/ev-page-accessible.c +++ b/libview/ev-page-accessible.c @@ -723,7 +723,7 @@ ev_page_accessible_get_selection (AtkText *text, for (l = view->selection_info.selections; l != NULL; l = l->next) { EvViewSelection *selection = (EvViewSelection *)l->data; - gint start, end; + gint start = 0, end = 0; if (selection->page != self->priv->page) continue;