Skip to contentSkip to conversation

coda: Remove set but not used variable 'err'

PATCH In review Baokun Li 1 participant 2 messages May 27, 2021 – Jun 15, 2021 Coda file system

lore
Share & tools
lore

Baokun Li

author
#0 lore raw

PATCH 1/1 coda: Remove set but not used variable 'err'

Fixes gcc '-Wunused-but-set-variable' warning:

fs/coda/file.c: In function 'coda_release':
fs/coda/file.c:241:6: warning:
variable ‘err’ set but not used [-Wunused-but-set-variable]

It never used since introduction.

---
 fs/coda/file.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
fs/coda/file.c +2 -3
index ef5ca22bfb3e..98eb543d4acc 100644
@@ -238,12 +238,11 @@ int coda_release(struct inode *coda_inode, struct file *coda_file)
 	struct coda_file_info *cfi;
 	struct coda_inode_info *cii;
 	struct inode *host_inode;
-	int err;
 
 	cfi = coda_ftoc(coda_file);
 
-	err = venus_close(coda_inode->i_sb, coda_i2f(coda_inode),
-			  coda_flags, coda_file->f_cred->fsuid);
+	venus_close(coda_inode->i_sb, coda_i2f(coda_inode),
+		    coda_flags, coda_file->f_cred->fsuid);
 
 	host_inode = file_inode(cfi->cfi_container);
 	cii = ITOC(coda_inode);
Signature · 1 line
2.25.4
#1 lore raw

ping

Quoted 32 lines · Baokun Li

Fixes gcc '-Wunused-but-set-variable' warning:

fs/coda/file.c: In function 'coda_release':
fs/coda/file.c:241:6: warning:
variable ‘err’ set but not used [-Wunused-but-set-variable]

It never used since introduction.

---
  fs/coda/file.c | 5 ++---
  1 file changed, 2 insertions(+), 3 deletions(-)
fs/coda/file.c +2 -3
index ef5ca22bfb3e..98eb543d4acc 100644
@@ -238,12 +238,11 @@ int coda_release(struct inode *coda_inode, struct file *coda_file)
  	struct coda_file_info *cfi;
  	struct coda_inode_info *cii;
  	struct inode *host_inode;
-	int err;
 
  	cfi = coda_ftoc(coda_file);
 
-	err = venus_close(coda_inode->i_sb, coda_i2f(coda_inode),
-			  coda_flags, coda_file->f_cred->fsuid);
+	venus_close(coda_inode->i_sb, coda_i2f(coda_inode),
+		    coda_flags, coda_file->f_cred->fsuid);
 
  	host_inode = file_inode(cfi->cfi_container);
  	cii = ITOC(coda_inode);