diff options
author | Dan Williams <dan.j.williams@intel.com> | 2010-07-06 12:48:59 -0700 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2010-07-06 12:48:59 -0700 |
commit | 569cc43ffb0634510defee91407d261555c7a991 (patch) | |
tree | dcb9110b2567d6ede548c195ca05d7cac0f229ec /super-intel.c | |
parent | f4190c2f12527e37304f7c185afa0449fa9dee1c (diff) | |
download | mdadm-569cc43ffb0634510defee91407d261555c7a991.tar.gz mdadm-569cc43ffb0634510defee91407d261555c7a991.tar.xz mdadm-569cc43ffb0634510defee91407d261555c7a991.zip |
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@intel.com>
Diffstat (limited to 'super-intel.c')
-rw-r--r-- | 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) { |