Commit e2a0be63 authored by Kir Kolyshkin's avatar Kir Kolyshkin Committed by Pavel Emelyanov

mnt_tree_for_each_reverse(): init a variable

A warning catched by clang:

> > mount.c:869:71: error: variable 'progress' is uninitialized when used here
> >       [-Werror,-Wuninitialized]
> >   ...prev, MNT_WALK_NONE, fn, (struct list_head *) NULL, progress);
> >                                                          ^~~~~~~~
> > mount.c:802:4: note: expanded from macro 'MNT_TREE_WALK'
> >                         _prgs++;
> > \
> >                         ^
> > mount.c:867:14: note: initialize the variable 'progress' to silence this
> > warning
> >         int progress;
> >                     ^
> >                      = 0
> > 1 error generated.
Signed-off-by: 's avatarKir Kolyshkin <kir@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent ca44f6f0
...@@ -864,7 +864,7 @@ again: ...@@ -864,7 +864,7 @@ again:
static int mnt_tree_for_each_reverse(struct mount_info *m, static int mnt_tree_for_each_reverse(struct mount_info *m,
int (*fn)(struct mount_info *)) int (*fn)(struct mount_info *))
{ {
int progress; int progress = 0;
MNT_TREE_WALK(m, prev, MNT_WALK_NONE, fn, (struct list_head *) NULL, progress); MNT_TREE_WALK(m, prev, MNT_WALK_NONE, fn, (struct list_head *) NULL, progress);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment