Skip to content

Commit ed04a91

Browse files
author
Darrick J. Wong
committed
xfs: fix uninit warning in xfs_growfs_data
Quiet down this gcc warning: fs/xfs/xfs_fsops.c: In function ‘xfs_growfs_data’: fs/xfs/xfs_fsops.c:219:21: error: ‘lastag_extended’ may be used uninitialized in this function [-Werror=maybe-uninitialized] 219 | if (lastag_extended) { | ^~~~~~~~~~~~~~~ fs/xfs/xfs_fsops.c:100:33: note: ‘lastag_extended’ was declared here 100 | bool lastag_extended; | ^~~~~~~~~~~~~~~ By setting its value explicitly. From code analysis I don't think this is a real problem, but I have better things to do than analyse this closely. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Dave Chinner <dchinner@redhat.com>
1 parent 34accea commit ed04a91

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/xfs/xfs_fsops.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ xfs_growfs_data_private(
9393
xfs_agnumber_t nagimax = 0;
9494
xfs_rfsblock_t nb, nb_div, nb_mod;
9595
int64_t delta;
96-
bool lastag_extended;
96+
bool lastag_extended = false;
9797
xfs_agnumber_t oagcount;
9898
struct xfs_trans *tp;
9999
struct aghdr_init_data id = {};

0 commit comments

Comments
 (0)