Dan Williams: imsm: fix a -O2 build warning
Martin F. Krafft
madduck at alioth.debian.org
Sat Aug 28 18:46:47 UTC 2010
Module: mdadm
Branch: master
Commit: 569cc43ffb0634510defee91407d261555c7a991
URL: http://git.debian.org/?p=pkg-mdadm/mdadm.git;a=commit;h=569cc43ffb0634510defee91407d261555c7a991
Author: Dan Williams <dan.j.williams at intel.com>
Date: Tue Jul 6 12:48:59 2010 -0700
imsm: fix a -O2 build warning
super-intel.c: In function ‘imsm_add_spare’:
super-intel.c:4833: error: ‘array_start’ may be used uninitialized in this function
super-intel.c:4834: error: ‘array_end’ may be used uninitialized in this function
This is valid, if we don't find a spare candidate then array_{start,end}
will be uninitialized.
Signed-off-by: Dan Williams <dan.j.williams at intel.com>
---
super-intel.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/super-intel.c b/super-intel.c
index daf811f..6826d9b 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -4830,8 +4830,8 @@ static struct dl *imsm_add_spare(struct intel_super *super, int slot,
struct extent *ex;
int i, j;
int found;
- __u32 array_start;
- __u32 array_end;
+ __u32 array_start = 0;
+ __u32 array_end = 0;
struct dl *dl;
for (dl = super->disks; dl; dl = dl->next) {
More information about the pkg-mdadm-commits
mailing list