(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:
Andreas Mohr 2016-04-24 17:43:38 +00:00 committed by Andrew Borodin
parent f03bb30a5a
commit 1c2060c28f

View File

@ -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)