summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2017-02-06 11:41:22 +0100
committerZdenek Kabelac <zkabelac@redhat.com>2017-02-06 11:43:07 +0100
commit811d137d3f93da892365f9c9a4772033a891c687 (patch)
treefc980f000ba22c2cf2c4faca0e6b229412af2532
parent9fe8c2da36a42a9cf08ef44ede172e1341033a24 (diff)
downloadlvm2-811d137d3f93da892365f9c9a4772033a891c687.tar.gz
cleanup: hide gcc warning
Gcc is not clever enough to see these vars are actually initialize in given code path so let's just make sure it has a value.
-rw-r--r--libdm/libdm-stats.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libdm/libdm-stats.c b/libdm/libdm-stats.c
index f0342a0f6..f68874cae 100644
--- a/libdm/libdm-stats.c
+++ b/libdm/libdm-stats.c
@@ -4584,7 +4584,7 @@ static uint64_t *_stats_map_file_regions(struct dm_stats *dms, int fd,
int precise, uint64_t group_id,
uint64_t *count, int *regroup)
{
- struct _extent *extents = NULL, *old_extents;
+ struct _extent *extents = NULL, *old_extents = NULL;
uint64_t *regions = NULL, fail_region;
struct dm_stats_group *group = NULL;
struct dm_pool *extent_mem = NULL;
@@ -4592,7 +4592,7 @@ static uint64_t *_stats_map_file_regions(struct dm_stats *dms, int fd,
char *hist_arg = NULL;
int update, num_bits;
struct statfs fsbuf;
- int64_t nr_kept, i;
+ int64_t nr_kept = 0, i;
struct stat buf;
update = _stats_group_id_present(dms, group_id);