[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20230523162357.GX32559@twin.jikos.cz>
Date: Tue, 23 May 2023 18:23:57 +0200
From: David Sterba <dsterba@...e.cz>
To: pengfuyuan <pengfuyuan@...inos.cn>
Cc: Chris Mason <clm@...com>, Josef Bacik <josef@...icpanda.com>,
David Sterba <dsterba@...e.com>, linux-btrfs@...r.kernel.org,
linux-kernel@...r.kernel.org, k2ci <kernel-bot@...inos.cn>
Subject: Re: [PATCH] btrfs: fix uninitialized variable warnings
On Tue, May 23, 2023 at 04:59:35PM +0800, pengfuyuan wrote:
>
> There are some warnings on older compilers (gcc 10, 7) or non-x86_64
> architectures (mips64). As btrfs wants to enable -Wmaybe-uninitialized
> by default, fix the warnings even though it's not necessary on recent
> compilers (gcc 12+).
>
> fs/btrfs/tree-log.c: In function ???btrfs_log_inode???:
> fs/btrfs/tree-log.c:6211:9: error: ???last_range_start??? may be used uninitialized in this function [-Werror=maybe-uninitialized]
> 6211 | ret = insert_dir_log_key(trans, log, path, key.objectid,
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 6212 | first_dir_index, last_dir_index);
> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> fs/btrfs/tree-log.c:6161:6: note: ???last_range_start??? was declared here
> 6161 | u64 last_range_start;
> | ^~~~~~~~~~~~~~~~
> cc1: all warnings being treated as errors
>
> Reported-by: k2ci <kernel-bot@...inos.cn>
> Signed-off-by: pengfuyuan <pengfuyuan@...inos.cn>
Thanks, this warning got reported reported recently [1] and the fix is
now in queue.
[1] https://lore.kernel.org/linux-btrfs/20230516013430.2712449-1-zhangshida@kylinos.cn/
Powered by blists - more mailing lists