From: Boris Burkov <boris@bur.io>
To: Lu Yao <yaolu@kylinos.cn>
Cc: clm@fb.com, josef@toxicpanda.com, dsterba@suse.com,
linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] btrfs: scrub: fix a compilation warning
Date: Wed, 8 May 2024 08:37:35 -0700 [thread overview]
Message-ID: <20240508153735.GB372255@zen.localdomain> (raw)
In-Reply-To: <20240507023417.31796-1-yaolu@kylinos.cn>
On Tue, May 07, 2024 at 10:34:17AM +0800, Lu Yao wrote:
> The following error message is displayed:
> ../fs/btrfs/scrub.c:2152:9: error: ‘ret’ may be used uninitialized
> in this function [-Werror=maybe-uninitialized]"
>
> Signed-off-by: Lu Yao <yaolu@kylinos.cn>
Reviewed-by: Boris Burkov <boris@bur.io>
> ---
> gcc version: (Debian 10.2.1-6) 10.2.1 20210110
> ---
> fs/btrfs/scrub.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
> index 4b22cfe9a98c..afd6932f5e89 100644
> --- a/fs/btrfs/scrub.c
> +++ b/fs/btrfs/scrub.c
> @@ -2100,7 +2100,7 @@ static int scrub_simple_mirror(struct scrub_ctx *sctx,
> struct btrfs_fs_info *fs_info = sctx->fs_info;
> const u64 logical_end = logical_start + logical_length;
> u64 cur_logical = logical_start;
> - int ret;
> + int ret = 0;
>
> /* The range must be inside the bg */
> ASSERT(logical_start >= bg->start && logical_end <= bg->start + bg->length);
> --
> 2.25.1
>
next prev parent reply other threads:[~2024-05-08 15:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-07 2:34 [PATCH] btrfs: scrub: fix a compilation warning Lu Yao
2024-05-08 15:37 ` Boris Burkov [this message]
2024-05-13 18:58 ` David Sterba
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=20240508153735.GB372255@zen.localdomain \
--to=boris@bur.io \
--cc=clm@fb.com \
--cc=dsterba@suse.com \
--cc=josef@toxicpanda.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=yaolu@kylinos.cn \
/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;
as well as URLs for NNTP newsgroup(s).