From 75064b74242116ff37f726d74795fb115a486306 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Fri, 25 Mar 2022 17:27:11 -0700 Subject: [PATCH] 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 --- criu/mount.c | 1 + 1 file changed, 1 insertion(+) diff --git a/criu/mount.c b/criu/mount.c index 8b6cdaf45..65e186af9 100644 --- a/criu/mount.c +++ b/criu/mount.c @@ -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; }