mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 20:51:03 +02:00
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💯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>
This commit is contained in:
@@ -93,7 +93,7 @@ xfs_growfs_data_private(
|
|||||||
xfs_agnumber_t nagimax = 0;
|
xfs_agnumber_t nagimax = 0;
|
||||||
xfs_rfsblock_t nb, nb_div, nb_mod;
|
xfs_rfsblock_t nb, nb_div, nb_mod;
|
||||||
int64_t delta;
|
int64_t delta;
|
||||||
bool lastag_extended;
|
bool lastag_extended = false;
|
||||||
xfs_agnumber_t oagcount;
|
xfs_agnumber_t oagcount;
|
||||||
struct xfs_trans *tp;
|
struct xfs_trans *tp;
|
||||||
struct aghdr_init_data id = {};
|
struct aghdr_init_data id = {};
|
||||||
|
Reference in New Issue
Block a user