mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
libdm: move initialisation of group_id in _aggregate_histogram()
Older compilers are not able to determine that although group_id is only assigned in one branch of a conditional, it is never used used when the other branch is taken: libdm-stats.c:3319: warning: "group_id" may be used uninitialized in this function Avoid this by always initialising the variable when it is declared.
This commit is contained in:
parent
97b6486b27
commit
146b2582b0
@ -3315,8 +3315,8 @@ static struct dm_histogram *_aggregate_histogram(const struct dm_stats *dms,
|
||||
uint64_t area_id)
|
||||
{
|
||||
struct dm_histogram *dmh_aggr, *dmh_cur, **dmh_cachep;
|
||||
uint64_t group_id = DM_STATS_GROUP_NOT_PRESENT;
|
||||
int bin, nr_bins, group = 1;
|
||||
uint64_t group_id;
|
||||
size_t hist_size;
|
||||
|
||||
if (area_id == DM_STATS_WALK_REGION) {
|
||||
|
Loading…
Reference in New Issue
Block a user