From 9c0b5e89ce10e6ccfb57a355a4f4481d3655804b Mon Sep 17 00:00:00 2001
From: Andreas Mohr <and@gmx.li>
Date: Sun, 24 Apr 2016 17:43:38 +0000
Subject: [PATCH] Cleanup cppcheck warning at utilunix.c
Cleanup following cppcheck warnings:
[lib/utilunix.c:1109]: (style) Unused variable: link_path
[lib/utilunix.c:1113]: (style) Variable 'readlinks' is assigned a value that is never used.
[lib/utilunix.c:1114]: (style) Unused variable: n
Signed-off-by: Andreas Mohr <and@gmx.li>
---
lib/utilunix.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/utilunix.c b/lib/utilunix.c
index fef7a64..8192923 100644
a
|
b
|
char * |
1106 | 1106 | mc_realpath (const char *path, char *resolved_path) |
1107 | 1107 | { |
1108 | 1108 | char copy_path[PATH_MAX]; |
1109 | | char link_path[PATH_MAX]; |
1110 | 1109 | char got_path[PATH_MAX]; |
1111 | 1110 | char *new_path = got_path; |
1112 | 1111 | char *max_path; |
| 1112 | #ifdef S_IFLNK |
| 1113 | char link_path[PATH_MAX]; |
1113 | 1114 | int readlinks = 0; |
1114 | 1115 | int n; |
| 1116 | #endif /* S_IFLNK */ |
1115 | 1117 | |
1116 | 1118 | /* Make a copy of the source path since we may need to modify it. */ |
1117 | 1119 | if (strlen (path) >= PATH_MAX - 2) |