From a62cea3371cfac10f74a135b1969120e10f48f60 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Fri, 11 Jul 2014 13:47:50 +0200 Subject: [PATCH] cleanup: older gcc is not smart enough Avoid gcc warning about uninitialized 'seg' variable. It's not easy for older gcc compiler to deduce it's been set. --- tools/lvconvert.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lvconvert.c b/tools/lvconvert.c index ff32f7640..3a5f1295b 100644 --- a/tools/lvconvert.c +++ b/tools/lvconvert.c @@ -2958,7 +2958,7 @@ static int _lvconvert_pool(struct cmd_context *cmd, /* Swap normal LV with pool's metadata LV ? */ if (lv_is_pool(pool_lv)) { /* Swap names between old and new metadata LV */ - if (!detach_pool_metadata_lv(seg, &pool_metadata_lv)) + if (!detach_pool_metadata_lv(first_seg(pool_lv), &pool_metadata_lv)) return_0; old_name = metadata_lv->name; if (!lv_rename_update(cmd, metadata_lv, "pvmove_tmeta", 0))