[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230406191204.GZ19619@twin.jikos.cz>
Date: Thu, 6 Apr 2023 21:12:04 +0200
From: David Sterba <dsterba@...e.cz>
To: Genjian <zhanggenjian123@...il.com>
Cc: clm@...com, josef@...icpanda.com, dsterba@...e.com,
linux-btrfs@...r.kernel.org, linux-kernel@...r.kernel.org,
Genjian Zhang <zhanggenjian@...inos.cn>,
k2ci <kernel-bot@...inos.cn>
Subject: Re: [PATCH] btrfs: fix uninitialized variable warning
On Fri, Mar 24, 2023 at 10:08:38AM +0800, Genjian wrote:
> From: Genjian Zhang <zhanggenjian@...inos.cn>
>
> compiler warning:
>
> ../fs/btrfs/volumes.c: In function ‘btrfs_init_new_device’:
> ../fs/btrfs/volumes.c:2703:3: error: ‘seed_devices’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
> 2703 | btrfs_setup_sprout(fs_info, seed_devices);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> ../fs/btrfs/send.c: In function ‘get_cur_inode_state’:
> ../include/linux/compiler.h:70:32: error: ‘right_gen’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
> 70 | (__if_trace.miss_hit[1]++,1) : \
> | ^
> ../fs/btrfs/send.c:1878:6: note: ‘right_gen’ was declared here
> 1878 | u64 right_gen;
> | ^~~~~~~~~
>
> Initialize the uninitialized variables.
>
> Reported-by: k2ci <kernel-bot@...inos.cn>
> Signed-off-by: Genjian Zhang <zhanggenjian@...inos.cn>
The warnings are still reported by other build reports so I'll apply
this patch. If you have found more please send a patch or I can update
this one once applied. Thanks.
Powered by blists - more mailing lists