mirror of
https://github.com/MidnightCommander/mc
synced 2025-03-12 19:03:10 +03:00
cleanup gcc link time optimization warnings
coord_cache.c: In function 'mcview_ccache_lookup.constprop': coord_cache.c:374:31: error: 'nextc' may be used uninitialized in this function [-Werror=maybe-uninitialized] coord_cache.c:342:16: note: 'nextc' was declared here boxes.c: In function 'sort_box': boxes.c:877:5: error: 'sort_names_num' may be used uninitialized in this function [-Werror=maybe-uninitialized] boxes.c:871:11: note: 'sort_names_num' was declared here actions_cmd.c: In function 'mcview_callback': actions_cmd.c:252:42: error: 'byte_val' may be used uninitialized in this function [-Werror=maybe-uninitialized] actions_cmd.c:223:9: note: 'byte_val' was declared here Signed-off-by: Andreas Mohr <and@gmx.li> Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
f252234772
commit
28280c1870
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user