From bb925ff08beda785d42f5ff8a0f082d91c5caad4 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Fri, 16 Aug 2013 20:21:55 +0200 Subject: [PATCH] DDF: ddf_activate_spare: fix gcc -O2 uninitialized warning At this point 'di' and 'rv' both have the same value. gcc doesn't realise that and a human reader might not either. 'rv' makes more sense too, so use that. Signed-off-by: Martin Wilck Signed-off-by: NeilBrown --- super-ddf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/super-ddf.c b/super-ddf.c index e3b3dcaa..ee6499a3 100644 --- a/super-ddf.c +++ b/super-ddf.c @@ -4959,7 +4959,7 @@ static struct mdinfo *ddf_activate_spare(struct active_array *a, * Create a metadata_update record to update the * phys_refnum and lba_offset values */ - vc = find_vdcr(ddf, a->info.container_member, di->disk.raid_disk, + vc = find_vdcr(ddf, a->info.container_member, rv->disk.raid_disk, &n_bvd, &vcl); if (vc == NULL) return NULL; -- 2.39.2