public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH] reiserfs: remove unused iter variable
@ 2023-03-31 12:03 Tom Rix
  2023-03-31 12:21 ` Jan Kara
  0 siblings, 1 reply; 2+ messages in thread
From: Tom Rix @ 2023-03-31 12:03 UTC (permalink / raw)
  To: nathan, ndesaulniers, axboe, akpm, bvanassche, jack, yi.zhang
  Cc: reiserfs-devel, linux-kernel, llvm, Tom Rix

clang with W=1 reports
fs/reiserfs/stree.c:1265:6: error: variable
  'iter' set but not used [-Werror,-Wunused-but-set-variable]
        int iter = 0;
            ^
This variable is not used so remove it.

Signed-off-by: Tom Rix <trix@redhat.com>
---
 fs/reiserfs/stree.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fs/reiserfs/stree.c b/fs/reiserfs/stree.c
index 84c12a1947b2..ce5003986789 100644
--- a/fs/reiserfs/stree.c
+++ b/fs/reiserfs/stree.c
@@ -1262,7 +1262,6 @@ int reiserfs_delete_item(struct reiserfs_transaction_handle *th,
 
 #ifdef CONFIG_REISERFS_CHECK
 	char mode;
-	int iter = 0;
 #endif
 
 	BUG_ON(!th->t_trans_id);
@@ -1274,7 +1273,6 @@ int reiserfs_delete_item(struct reiserfs_transaction_handle *th,
 		removed = 0;
 
 #ifdef CONFIG_REISERFS_CHECK
-		iter++;
 		mode =
 #endif
 		    prepare_for_delete_or_cut(th, inode, path,
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] reiserfs: remove unused iter variable
  2023-03-31 12:03 [PATCH] reiserfs: remove unused iter variable Tom Rix
@ 2023-03-31 12:21 ` Jan Kara
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Kara @ 2023-03-31 12:21 UTC (permalink / raw)
  To: Tom Rix
  Cc: nathan, ndesaulniers, axboe, akpm, bvanassche, jack, yi.zhang,
	reiserfs-devel, linux-kernel, llvm

On Fri 31-03-23 08:03:25, Tom Rix wrote:
> clang with W=1 reports
> fs/reiserfs/stree.c:1265:6: error: variable
>   'iter' set but not used [-Werror,-Wunused-but-set-variable]
>         int iter = 0;
>             ^
> This variable is not used so remove it.
> 
> Signed-off-by: Tom Rix <trix@redhat.com>

Thanks. I've merged the patch to my tree.

								Honza

> ---
>  fs/reiserfs/stree.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/fs/reiserfs/stree.c b/fs/reiserfs/stree.c
> index 84c12a1947b2..ce5003986789 100644
> --- a/fs/reiserfs/stree.c
> +++ b/fs/reiserfs/stree.c
> @@ -1262,7 +1262,6 @@ int reiserfs_delete_item(struct reiserfs_transaction_handle *th,
>  
>  #ifdef CONFIG_REISERFS_CHECK
>  	char mode;
> -	int iter = 0;
>  #endif
>  
>  	BUG_ON(!th->t_trans_id);
> @@ -1274,7 +1273,6 @@ int reiserfs_delete_item(struct reiserfs_transaction_handle *th,
>  		removed = 0;
>  
>  #ifdef CONFIG_REISERFS_CHECK
> -		iter++;
>  		mode =
>  #endif
>  		    prepare_for_delete_or_cut(th, inode, path,
> -- 
> 2.27.0
> 
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-03-31 12:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-31 12:03 [PATCH] reiserfs: remove unused iter variable Tom Rix
2023-03-31 12:21 ` Jan Kara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox