2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-29 21:38:16 +00:00

mount: fix -Wunused-but-set-variable for Clang 15

Since https://reviews.llvm.org/D122271, Clang -Wset-but-unused-variable
gets smarter to warn about unused post-increments.

Signed-off-by: Fangrui Song <maskray@google.com>
This commit is contained in:
Fangrui Song 2022-03-25 17:27:11 -07:00 committed by Andrei Vagin
parent 46e4773c3b
commit 75064b7424

View File

@ -1991,6 +1991,7 @@ static int mnt_tree_for_each_reverse(struct mount_info *m, int (*fn)(struct moun
int progress = 0;
MNT_TREE_WALK(m, prev, MNT_WALK_NONE, fn, (struct list_head *)NULL, progress);
(void)progress; // Suppress -Wused-but-unset-variable for clang>=15
return 0;
}