Ticket #4426: mc-4357-file-remove-unused-variable.patch

File mc-4357-file-remove-unused-variable.patch, 1.4 KB (added by zaytsev, 17 months ago)
  • src/filemanager/find.c

    From dd816c5b2da058d0814fb1d20e270e26faa1bea4 Mon Sep 17 00:00:00 2001
    From: Andreas Mohr <and@gmx.li>
    Date: Sat, 14 Jan 2023 10:11:43 +0000
    Subject: [PATCH] (find.c) remove unused variable
    
    find.c:1807:13: error: variable 'i' set but not used [-Werror,-Wunused-but-set-variable]
            int i;
                ^
    
    Found by clang 15
    
    Signed-off-by: Andreas Mohr <and@gmx.li>
    ---
     src/filemanager/find.c | 5 ++---
     1 file changed, 2 insertions(+), 3 deletions(-)
    
    diff --git a/src/filemanager/find.c b/src/filemanager/find.c
    index b9d5320bc..6b42bdd34 100644
    a b do_find (WPanel * panel, const char *start_dir, ssize_t start_dir_len, const cha 
    18041804 
    18051805    if (return_value == B_PANELIZE && *filename) 
    18061806    { 
    1807         int i; 
    18081807        struct stat st; 
    18091808        GList *entry; 
    18101809        dir_list *list = &panel->dir; 
    do_find (WPanel * panel, const char *start_dir, ssize_t start_dir_len, const cha 
    18131812        panel_clean_dir (panel); 
    18141813        dir_list_init (list); 
    18151814 
    1816         for (i = 0, entry = listbox_get_first_link (find_list); entry != NULL; 
    1817              i++, entry = g_list_next (entry)) 
     1815        for (entry = listbox_get_first_link (find_list); entry != NULL; 
     1816             entry = g_list_next (entry)) 
    18181817        { 
    18191818            const char *lc_filename = NULL; 
    18201819            WLEntry *le = LENTRY (entry->data);