mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-18 17:29:28 +03:00
(mc_realpath): cleanup cppcheck warning.
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> Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
f03bb30a5a
commit
1c2060c28f
@ -1106,12 +1106,14 @@ char *
|
||||
mc_realpath (const char *path, char *resolved_path)
|
||||
{
|
||||
char copy_path[PATH_MAX];
|
||||
char link_path[PATH_MAX];
|
||||
char got_path[PATH_MAX];
|
||||
char *new_path = got_path;
|
||||
char *max_path;
|
||||
#ifdef S_IFLNK
|
||||
char link_path[PATH_MAX];
|
||||
int readlinks = 0;
|
||||
int n;
|
||||
#endif /* S_IFLNK */
|
||||
|
||||
/* Make a copy of the source path since we may need to modify it. */
|
||||
if (strlen (path) >= PATH_MAX - 2)
|
||||
|
Loading…
Reference in New Issue
Block a user