From 569cc43ffb0634510defee91407d261555c7a991 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 6 Jul 2010 12:48:59 -0700 Subject: imsm: fix a -O2 build warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- super-intel.c | 4 ++-- 1 file 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) { -- cgit