From 1bdf814052728fb1bfc75a888ba2ad257d6d65ec Mon Sep 17 00:00:00 2001 From: Andreas Mohr Date: Fri, 25 Feb 2022 19:11:42 +0000 Subject: [PATCH] (mc_setup_by_args): reduce variable scope into #ifdef to fix coverity finding. Found by Coverity. Coverity id #331837 Signed-off-by: Andreas Mohr Signed-off-by: Andrew Borodin --- src/args.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/args.c b/src/args.c index e87579bab..e725fa7d8 100644 --- a/src/args.c +++ b/src/args.c @@ -770,16 +770,16 @@ mc_setup_by_args (int argc, char **argv, GError ** mcerror) mc_global.tty.use_subshell = FALSE; #endif /* ENABLE_SUBSHELL */ +#ifdef ENABLE_VFS_FTP if (mc_args__netfs_logfile != NULL) { vfs_path_t *vpath; -#ifdef ENABLE_VFS_FTP + vpath = vfs_path_from_str ("ftp://"); mc_setctl (vpath, VFS_SETCTL_LOGFILE, (void *) mc_args__netfs_logfile); vfs_path_free (vpath, TRUE); -#endif /* ENABLE_VFS_FTP */ - (void) vpath; } +#endif /* ENABLE_VFS_FTP */ tmp = (argc > 0) ? argv[1] : NULL;