diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2021-09-10 22:32:44 +0200 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2021-09-13 12:34:41 +0200 |
commit | 63930f576a29d701894586c6ef1f90bf63f321d1 (patch) | |
tree | 2d225ba46d93e263e98fdeb0eeaf0d98809cc86d /libdm | |
parent | f5f1cdfa70ad2ec907fba8b9f5d0c1a251571c80 (diff) | |
download | lvm2-63930f576a29d701894586c6ef1f90bf63f321d1.tar.gz |
cov: add some initializers
Diffstat (limited to 'libdm')
-rw-r--r-- | libdm/libdm-report.c | 8 | ||||
-rw-r--r-- | libdm/libdm-stats.c | 4 |
2 files changed, 6 insertions, 6 deletions
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; |