-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmc-4357-file-remove-unused-variable.patch
39 lines (33 loc) · 1.36 KB
/
mc-4357-file-remove-unused-variable.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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/src/filemanager/find.c
+++ b/src/filemanager/find.c
@@ -1804,7 +1804,6 @@ do_find (WPanel * panel, const char *start_dir, ssize_t start_dir_len, const cha
if (return_value == B_PANELIZE && *filename)
{
- int i;
struct stat st;
GList *entry;
dir_list *list = &panel->dir;
@@ -1813,8 +1812,8 @@ do_find (WPanel * panel, const char *start_dir, ssize_t start_dir_len, const cha
panel_clean_dir (panel);
dir_list_init (list);
- for (i = 0, entry = listbox_get_first_link (find_list); entry != NULL;
- i++, entry = g_list_next (entry))
+ for (entry = listbox_get_first_link (find_list); entry != NULL;
+ entry = g_list_next (entry))
{
const char *lc_filename = NULL;
WLEntry *le = LENTRY (entry->data);