From: Lukas Czerner <lczerner@redhat.com>
To: Eric Biggers <ebiggers@kernel.org>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [e2fsprogs PATCH] resize2fs: remove unused variable from adjust_superblock()
Date: Wed, 4 Jan 2023 11:35:43 +0100 [thread overview]
Message-ID: <20230104103543.bzdpmz4iy7flpmdi@fedora> (raw)
In-Reply-To: <20230104090351.276159-1-ebiggers@kernel.org>
On Wed, Jan 04, 2023 at 01:03:51AM -0800, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@google.com>
>
> In adjust_superblock(), the 'group_block' variable is declared and set,
> but it is never actually used. Remove it.
>
> This addresses the following compiler warning with clang -Wall:
>
> resize2fs.c:1119:11: warning: variable 'group_block' set but not used [-Wunused-but-set-variable]
> blk64_t group_block;
Looks good thanks.
Reviewed-by: Lukas Czerner <lczerner@redhat.com>
> ^
> Signed-off-by: Eric Biggers <ebiggers@google.com>
> ---
> resize/resize2fs.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/resize/resize2fs.c b/resize/resize2fs.c
> index 243cd777..5eeb7d44 100644
> --- a/resize/resize2fs.c
> +++ b/resize/resize2fs.c
> @@ -1116,7 +1116,6 @@ static errcode_t adjust_superblock(ext2_resize_t rfs, blk64_t new_size)
> ext2_filsys fs = rfs->new_fs;
> int adj = 0;
> errcode_t retval;
> - blk64_t group_block;
> unsigned long i;
> unsigned long max_group;
>
> @@ -1181,8 +1180,6 @@ static errcode_t adjust_superblock(ext2_resize_t rfs, blk64_t new_size)
> goto errout;
>
> memset(rfs->itable_buf, 0, fs->blocksize * fs->inode_blocks_per_group);
> - group_block = ext2fs_group_first_block2(fs,
> - rfs->old_fs->group_desc_count);
> adj = rfs->old_fs->group_desc_count;
> max_group = fs->group_desc_count - adj;
> if (rfs->progress) {
> @@ -1209,7 +1206,6 @@ static errcode_t adjust_superblock(ext2_resize_t rfs, blk64_t new_size)
> if (retval)
> goto errout;
> }
> - group_block += fs->super->s_blocks_per_group;
> }
> io_channel_flush(fs->io);
> retval = 0;
> --
> 2.39.0
>
prev parent reply other threads:[~2023-01-04 10:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-04 9:03 [e2fsprogs PATCH] resize2fs: remove unused variable from adjust_superblock() Eric Biggers
2023-01-04 10:35 ` Lukas Czerner [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230104103543.bzdpmz4iy7flpmdi@fedora \
--to=lczerner@redhat.com \
--cc=ebiggers@kernel.org \
--cc=linux-ext4@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox