Re: [dm-devel] [PATCH linux-next] DM RAID:validate_raid_redundancy: Silence uninitialized variable warning

From: Alasdair G Kergon
Date: Thu Feb 21 2013 - 08:19:40 EST


On Wed, Feb 20, 2013 at 01:31:18PM -0700, Tim Gardner wrote:
> drivers/md/dm-raid.c: In function 'raid_ctr':
> drivers/md/dm-raid.c:453:53: warning: 'rebuilds_per_group' may be used uninitialized in this function [-Wuninitialized]
> drivers/md/dm-raid.c:383:11: note: 'rebuilds_per_group' was declared here

> It appears unlikely that rebuilds_per_group could be used before set, but set
> it to 0 anyways just to shutup GCC.

Looks bogus to me.
uninitialized_var() please.

Alasdair

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/