arch/um: remove unused varible err in remove_files_and_dir()
PATCH 1/1 arch/um: remove unused varible err in remove_files_and_dir()
From: Alex Shi <[email protected]>
err is duplicated with errno, and never used. So remove it to fix warnning:arch/um/os-Linux/umid.c:139:16: warning: variable 'err' set but not used [-Wunused-but-set-variable]
139 | int fd, p, n, err;
| ^
Reported-by kernel test robot <[email protected]>
Signed-off-by Alex Shi <[email protected]>
Cc Johannes Berg <[email protected]>
Cc Anton Ivanov <[email protected]>
Cc Richard Weinberger <[email protected]>
--- arch/um/os-Linux/umid.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
arch/um/os-Linux/umid.c +1 -2
@@ -136,7 +136,7 @@ static int remove_files_and_dir(char *dir)static inline int is_umdir_used (char *dir) {char pid[sizeof ("nnnnnnnnn" )], *end, *file; -int fd, p, n, err; +int fd, p, n;size_t filelen =strlen (dir) +sizeof ("/pid" ) +1 ; file =malloc (filelen);
@@ -155,7 +155,6 @@ static inline int is_umdir_used(char *dir) goto out; } - err =0 ; n =read (fd, pid,sizeof (pid));if (n <0 ) { printk(UM_KERN_ERR "is_umdir_used : couldn't read pid file "
Signature · 1 line
2.43.0