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]
Message-ID: <230384e8-55dc-579d-64e8-0c0263b72673@gmx.com>
Date:   Thu, 8 Jun 2023 13:18:20 +0800
From:   Qu Wenruo <quwenruo.btrfs@....com>
To:     Ou Shixiong <oushixiong@...inos.cn>, Chris Mason <clm@...com>
Cc:     Josef Bacik <josef@...icpanda.com>,
        David Sterba <dsterba@...e.com>, linux-btrfs@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] btrfs: scrub: initialize variable explicitly



On 2023/6/8 10:49, Ou Shixiong wrote:
>
> Fix error of
> error: ‘ret’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
>
> Signed-off-by: Ou Shixiong <oushixiong@...inos.cn>

Not again.

Please explain how @ret can be uninitialized, and your toolchain version.

To me, this looks like a false alert, and it's possible your toolchain
is out of date or lacks certain backports.

Thanks,
Qu
> ---
>   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 28caad17ccc7..0d5c87c52c33 100644
> --- a/fs/btrfs/scrub.c
> +++ b/fs/btrfs/scrub.c
> @@ -1962,7 +1962,7 @@ static int scrub_simple_mirror(struct scrub_ctx *sctx,
>   	/* An artificial limit, inherit from old scrub behavior */
>   	struct btrfs_path path = { 0 };
>   	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);
>
>
> Content-type: Text/plain
>
> No virus found
> 		Checked by Hillstone Network AntiVirus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ