From 63930f576a29d701894586c6ef1f90bf63f321d1 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Fri, 10 Sep 2021 22:32:44 +0200 Subject: cov: add some initializers --- libdm/libdm-report.c | 8 ++++---- libdm/libdm-stats.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'libdm') diff --git a/libdm/libdm-report.c b/libdm/libdm-report.c index 2efcc07c9..f3bf628a5 100644 --- a/libdm/libdm-report.c +++ b/libdm/libdm-report.c @@ -2331,7 +2331,7 @@ static const char *_reserved_name(struct dm_report *rh, uint32_t field_num, const char *s, size_t len) { dm_report_reserved_handler handler; - const char *canonical_name; + const char *canonical_name = NULL; const char **name; char *tmp_s; char c; @@ -3909,7 +3909,7 @@ static struct selection_node *_parse_ex(struct dm_report *rh, static const char _pe_expected_msg[] = "Syntax error: right parenthesis expected at \'%s\'"; struct selection_node *sn = NULL; uint32_t t; - const char *tmp; + const char *tmp = NULL; t = _tok_op_log(s, next, SEL_MODIFIER_NOT | SEL_PRECEDENCE_PS); if (t == SEL_MODIFIER_NOT) { @@ -3955,7 +3955,7 @@ static struct selection_node *_parse_and_ex(struct dm_report *rh, struct selection_node *and_sn) { struct selection_node *n; - const char *tmp; + const char *tmp = NULL; n = _parse_ex(rh, s, next); if (!n) @@ -3987,7 +3987,7 @@ static struct selection_node *_parse_or_ex(struct dm_report *rh, struct selection_node *or_sn) { struct selection_node *n; - const char *tmp; + const char *tmp = NULL; n = _parse_and_ex(rh, s, next, NULL); if (!n) diff --git a/libdm/libdm-stats.c b/libdm/libdm-stats.c index 120ad4d68..6cfa23384 100644 --- a/libdm/libdm-stats.c +++ b/libdm/libdm-stats.c @@ -4519,7 +4519,7 @@ static int _stats_unmap_regions(struct dm_stats *dms, uint64_t group_id, struct dm_stats_region *region = NULL; struct dm_stats_group *group = NULL; uint64_t nr_kept, nr_old; - struct _extent ext; + struct _extent ext = { 0 }; int64_t i; group = &dms->groups[group_id]; @@ -4607,7 +4607,7 @@ static uint64_t *_stats_map_file_regions(struct dm_stats *dms, int fd, struct dm_pool *extent_mem = NULL; struct _extent *old_ext; char *hist_arg = NULL; - struct statfs fsbuf; + struct statfs fsbuf = { 0 }; int64_t nr_kept = 0; struct stat buf; int update; -- cgit v1.2.1