Skip to content

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;
      |                             ^~~
Edited by Pablo Correa Gomez

Merge request reports