lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Tue, 09 Apr 2013 23:16:03 +0300
From:	Stratos Karafotis <stratosk@...aphore.gr>
To:	Alasdair Kergon <agk@...hat.com>
CC:	dm-devel@...hat.com, Neil Brown <neilb@...e.de>,
	linux-raid@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH linux-next] dm-raid: Fix compiler warning

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@...aphore.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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ