From c894c3c87f7de3b1491455186fa49404685b2b10 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Fri, 15 Aug 2014 15:51:03 +0200 Subject: [PATCH] cleanup: gcc warn fix Since gcc fail to see the origin has been already set under condition above, just set origin again. --- tools/lvchange.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/lvchange.c b/tools/lvchange.c index 91c8087ac..db0317601 100644 --- a/tools/lvchange.c +++ b/tools/lvchange.c @@ -1000,6 +1000,7 @@ static int _lvchange_single(struct cmd_context *cmd, struct logical_volume *lv, } if (lv_is_cow(lv) && arg_count(cmd, activate_ARG)) { + origin = origin_from_cow(lv); if (origin->origin_count < 2) snaps_msg[0] = '\0'; else if (dm_snprintf(snaps_msg, sizeof(snaps_msg),