diff options
| author | Qiang Ma <maqianga@uniontech.com> | 2025-12-18 16:16:18 +0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-02-11 13:41:53 +0100 |
| commit | 990e40fb1d111041e840c91dc336ec87a69f43fc (patch) | |
| tree | 67f7b742cb86846f71552c96fc187545a2047dda /tools/perf/scripts/python/stackcollapse.py | |
| parent | 3835e49e146a4e6e7787b29465f1a23379b6ec44 (diff) | |
| download | kernel-990e40fb1d111041e840c91dc336ec87a69f43fc.tar.gz | |
btrfs: fix Wmaybe-uninitialized warning in replay_one_buffer()
[ Upstream commit 9c7e71c97c8cd086b148d0d3d1cd84a1deab023c ]
Warning was found when compiling using loongarch64-gcc 12.3.1:
$ make CFLAGS_tree-log.o=-Wmaybe-uninitialized
In file included from fs/btrfs/ctree.h:21,
from fs/btrfs/tree-log.c:12:
fs/btrfs/accessors.h: In function 'replay_one_buffer':
fs/btrfs/accessors.h:66:16: warning: 'inode_item' may be used uninitialized [-Wmaybe-uninitialized]
66 | return btrfs_get_##bits(eb, s, offsetof(type, member)); \
| ^~~~~~~~~~
fs/btrfs/tree-log.c:2803:42: note: 'inode_item' declared here
2803 | struct btrfs_inode_item *inode_item;
| ^~~~~~~~~~
Initialize the inode_item to NULL, the compiler does not seem to see the
relation between the first 'wc->log_key.type == BTRFS_INODE_ITEM_KEY'
check and the other one that also checks the replay phase.
Signed-off-by: Qiang Ma <maqianga@uniontech.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
