Skip to contentSkip to conversation

main - gcc: eliminate warnings

PATCH Zdenek Kabelac 1 participant 1 message Sep 7, 2022

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=e757965222607a21a240139d1696780c389b798d
Commit:        e757965222607a21a240139d1696780c389b798d
Parent:        973d0bd5b7110ad16fe26362c2586c961591ba4a
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Mon Sep 5 16:22:32 2022 +0200
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Wed Sep 7 14:58:01 2022 +0200

gcc: eliminate warnings

Gcc starts to show new warning - although unlikely to be able to hit initialize variables to 0.

---
 lib/config/config.c | 2 +-
 tools/lvcreate.c    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
lib/config/config.c +1 -1
index 230ec3225..5986e64b1 100644
@@ -1830,7 +1830,7 @@ static int _out_line_fn(const struct dm_config_node *cn, const char *line, void
 	char summary[MAX_COMMENT_LINE+1];
 	char version[9];
 	int pos = 0;
-	int space_prefix_len;
+	int space_prefix_len = 0;
 	const char *p;
 	size_t len;
 
tools/lvcreate.c +1 -1
index 9bf5f4821..670c52913 100644
@@ -252,7 +252,7 @@ static int _update_extents_params(struct volume_group *vg,
 	uint32_t size_rest;
 	uint32_t stripesize_extents;
 	uint32_t extents;
-	uint32_t base_calc_extents;
+	uint32_t base_calc_extents = 0;
 	uint32_t vdo_pool_max_extents;
 
 	if (lcp->size &&