From 71ff21f57ca961fb490bc2aaef8dc4b5f5d4d18e Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Wed, 23 Aug 2023 14:43:07 +0200 Subject: [PATCH] gcc: initialize variables --- lib/device/device_id.c | 2 +- tools/lvconvert.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/device/device_id.c b/lib/device/device_id.c index d5b2555a7..bcc703e35 100644 --- a/lib/device/device_id.c +++ b/lib/device/device_id.c @@ -2286,7 +2286,7 @@ void device_ids_validate(struct cmd_context *cmd, struct dm_list *scanned_devs, int *device_ids_invalid, int noupdate) { struct dm_list wrong_devs; - struct device *dev; + struct device *dev = NULL; struct device_list *devl; struct dev_use *du, *du2; struct dev_id *id; diff --git a/tools/lvconvert.c b/tools/lvconvert.c index 6ed4acf65..9471f2516 100644 --- a/tools/lvconvert.c +++ b/tools/lvconvert.c @@ -3069,7 +3069,7 @@ static int _lvconvert_to_pool(struct cmd_context *cmd, struct volume_group *vg = lv->vg; struct logical_volume *metadata_lv = NULL; /* existing or created */ struct logical_volume *data_lv; /* lv arg renamed */ - struct logical_volume *pool_lv; /* new lv created here */ + struct logical_volume *pool_lv = NULL; /* new lv created here */ const char *pool_metadata_name; /* user-specified lv name */ char converted_names[3*NAME_LEN]; /* preserve names of converted lv */ struct segment_type *pool_segtype; /* thinpool or cachepool */