Linux-ext4 Archive mirror
 help / color / mirror / Atom feed
* [e2fsprogs PATCH] libext2fs: remove unused variable in ext2fs_xattrs_read_inode()
@ 2023-01-04  9:03 Eric Biggers
  2023-01-04 10:23 ` Lukas Czerner
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Biggers @ 2023-01-04  9:03 UTC (permalink / raw
  To: linux-ext4; +Cc: Andreas Dilger

From: Eric Biggers <ebiggers@google.com>

Address the following compiler warning with gcc -Wall:

ext_attr.c: In function ‘ext2fs_xattrs_read_inode’:
ext_attr.c:1000:16: warning: unused variable ‘i’ [-Wunused-variable]
 1000 |         size_t i;
      |                ^

Cc: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Eric Biggers <ebiggers@google.com>
---
 lib/ext2fs/ext_attr.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/lib/ext2fs/ext_attr.c b/lib/ext2fs/ext_attr.c
index d36fe68d..6fc4214c 100644
--- a/lib/ext2fs/ext_attr.c
+++ b/lib/ext2fs/ext_attr.c
@@ -997,7 +997,6 @@ errcode_t ext2fs_xattrs_read_inode(struct ext2_xattr_handle *handle,
 	unsigned int storage_size;
 	char *start, *block_buf = NULL;
 	blk64_t blk;
-	size_t i;
 	errcode_t err = 0;
 
 	EXT2_CHECK_MAGIC(handle, EXT2_ET_MAGIC_EA_HANDLE);
-- 
2.39.0


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

* Re: [e2fsprogs PATCH] libext2fs: remove unused variable in ext2fs_xattrs_read_inode()
  2023-01-04  9:03 [e2fsprogs PATCH] libext2fs: remove unused variable in ext2fs_xattrs_read_inode() Eric Biggers
@ 2023-01-04 10:23 ` Lukas Czerner
  0 siblings, 0 replies; 2+ messages in thread
From: Lukas Czerner @ 2023-01-04 10:23 UTC (permalink / raw
  To: Eric Biggers; +Cc: linux-ext4, Andreas Dilger

On Wed, Jan 04, 2023 at 01:03:14AM -0800, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@google.com>
> 
> Address the following compiler warning with gcc -Wall:
> 
> ext_attr.c: In function ‘ext2fs_xattrs_read_inode’:
> ext_attr.c:1000:16: warning: unused variable ‘i’ [-Wunused-variable]
>  1000 |         size_t i;
>       |                ^

You might as well remove the unnecessary newline at the top of the
function.

But regardless, you can add.

Reviewed-by: Lukas Czerner <lczerner@redhat.com>

Thanks!
-Lukas

> 
> Cc: Andreas Dilger <adilger@dilger.ca>
> Signed-off-by: Eric Biggers <ebiggers@google.com>
> ---
>  lib/ext2fs/ext_attr.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/lib/ext2fs/ext_attr.c b/lib/ext2fs/ext_attr.c
> index d36fe68d..6fc4214c 100644
> --- a/lib/ext2fs/ext_attr.c
> +++ b/lib/ext2fs/ext_attr.c
> @@ -997,7 +997,6 @@ errcode_t ext2fs_xattrs_read_inode(struct ext2_xattr_handle *handle,
>  	unsigned int storage_size;
>  	char *start, *block_buf = NULL;
>  	blk64_t blk;
> -	size_t i;
>  	errcode_t err = 0;
>  
>  	EXT2_CHECK_MAGIC(handle, EXT2_ET_MAGIC_EA_HANDLE);
> -- 
> 2.39.0
> 


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

end of thread, other threads:[~2023-01-04 10:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-04  9:03 [e2fsprogs PATCH] libext2fs: remove unused variable in ext2fs_xattrs_read_inode() Eric Biggers
2023-01-04 10:23 ` Lukas Czerner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).