[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <a38d0254-f555-0aa0-6e3f-f549a137f171@huawei.com>
Date: Tue, 15 Jun 2021 09:58:55 +0800
From: "libaokun (A)" <libaokun1@...wei.com>
To: <jaharkes@...cmu.edu>, <coda@...cmu.edu>,
<codalist@...a.cs.cmu.edu>, <linux-kernel@...r.kernel.org>
CC: <weiyongjun1@...wei.com>, <yuehaibing@...wei.com>,
<yangjihong1@...wei.com>, <yukuai3@...wei.com>
Subject: Re: [PATCH -next] coda: Remove set but not used variable 'err'
ping
在 2021/5/27 17:05, 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.
>
> Signed-off-by: Baokun Li <libaokun1@...wei.com>
> ---
> fs/coda/file.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/fs/coda/file.c b/fs/coda/file.c
> index ef5ca22bfb3e..98eb543d4acc 100644
> --- a/fs/coda/file.c
> +++ b/fs/coda/file.c
> @@ -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);
Powered by blists - more mailing lists