lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 6 Apr 2020 12:43:08 +0800
From:   Coly Li <colyli@...e.de>
To:     Wang Hai <wanghai38@...wei.com>, kent.overstreet@...il.com
Cc:     linux-bcache@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] bcache: remove set but not used variable 'i'

On 2020/4/7 7:36 δΈ‹εˆ, Wang Hai wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/md/bcache/btree.c: In function bch_btree_check_thread:
> drivers/md/bcache/btree.c:1910:6: warning:
>  variable β€˜i’ set but not used [-Wunused-but-set-variable]
> 
> It's not used since commit 8e7102273f59 ("bcache: make bch_btree_check()
> to be multithreaded"), so remove it.
> 
> Reported-by: Hulk Robot <hulkci@...wei.com>
> Signed-off-by: Wang Hai <wanghai38@...wei.com>

Hi Hai,

Colin King already submitted a similar patch on Apr 2 to fix it.

Thanks.

Coly Li


> ---
>  drivers/md/bcache/btree.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/md/bcache/btree.c b/drivers/md/bcache/btree.c
> index 72856e5..b962313 100644
> --- a/drivers/md/bcache/btree.c
> +++ b/drivers/md/bcache/btree.c
> @@ -1907,10 +1907,10 @@ static int bch_btree_check_thread(void *arg)
>  	struct btree_iter iter;
>  	struct bkey *k, *p;
>  	int cur_idx, prev_idx, skip_nr;
> -	int i, n;
> +	int n;
>  
>  	k = p = NULL;
> -	i = n = 0;
> +	n = 0;
>  	cur_idx = prev_idx = 0;
>  	ret = 0;
>  
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ