linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH linux-next] dm-raid: Fix compiler warning
@ 2013-04-09 20:16 Stratos Karafotis
  0 siblings, 0 replies; only message in thread
From: Stratos Karafotis @ 2013-04-09 20:16 UTC (permalink / raw)
  To: Alasdair Kergon; +Cc: dm-devel, Neil Brown, linux-raid, linux-kernel

Fix the following compiler warning of uninitialized variable

drivers/md/dm-raid.c: In function ‘raid_ctr’:
drivers/md/dm-raid.c:427:160: warning: ‘rebuilds_per_group’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
drivers/md/dm-raid.c:383:11: note: ‘rebuilds_per_group’ was declared
here

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
---
 drivers/md/dm-raid.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/md/dm-raid.c b/drivers/md/dm-raid.c
index 1d3fe1a..8041de8 100644
--- a/drivers/md/dm-raid.c
+++ b/drivers/md/dm-raid.c
@@ -380,7 +380,7 @@ static int validate_region_size(struct raid_set *rs, unsigned long region_size)
 static int validate_raid_redundancy(struct raid_set *rs)
 {
 	unsigned i, rebuild_cnt = 0;
-	unsigned rebuilds_per_group, copies, d;
+	unsigned copies, d, rebuilds_per_group = 0;
 	unsigned group_size, last_group_start;
 
 	for (i = 0; i < rs->md.raid_disks; i++)
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-04-09 20:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-09 20:16 [PATCH linux-next] dm-raid: Fix compiler warning Stratos Karafotis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).