diff --git a/src/filemanager/boxes.c b/src/filemanager/boxes.c index 687442689..f0cd61e0f 100644 --- a/src/filemanager/boxes.c +++ b/src/filemanager/boxes.c @@ -868,7 +868,8 @@ const panel_field_t * sort_box (dir_sort_options_t * op, const panel_field_t * sort_field) { const char **sort_orders_names; - gsize sort_names_num, i; + gsize i; + gsize sort_names_num = 0; int sort_idx = 0; const panel_field_t *result = NULL; diff --git a/src/viewer/actions_cmd.c b/src/viewer/actions_cmd.c index 2e970d1ae..22807f0eb 100644 --- a/src/viewer/actions_cmd.c +++ b/src/viewer/actions_cmd.c @@ -220,7 +220,7 @@ static cb_ret_t mcview_handle_editkey (WView * view, int key) { struct hexedit_change_node *node; - int byte_val; + int byte_val = -1; /* Has there been a change at this position? */ node = view->change_list; diff --git a/src/viewer/coord_cache.c b/src/viewer/coord_cache.c index 665e58a17..152ed9218 100644 --- a/src/viewer/coord_cache.c +++ b/src/viewer/coord_cache.c @@ -339,7 +339,7 @@ mcview_ccache_lookup (WView * view, coord_cache_entry_t * coord, enum ccache_typ nroff_state = NROFF_START; for (; current.cc_offset < limit; current = next) { - int c, nextc; + int c; if (!mcview_get_byte (view, current.cc_offset, &c)) break; @@ -365,6 +365,8 @@ mcview_ccache_lookup (WView * view, coord_cache_entry_t * coord, enum ccache_typ /* and override some of them as necessary. */ if (c == '\r') { + int nextc = -1; + mcview_get_byte_indexed (view, current.cc_offset, 1, &nextc); /* Ignore '\r' if it is followed by '\r' or '\n'. If it is