From 2ea7eb003c97c06174fa4c6625dfed281d5f3119 Mon Sep 17 00:00:00 2001 From: Frantisek Sumsal Date: Wed, 15 Sep 2021 15:46:19 +0200 Subject: [PATCH] repart: mark an assert()-only variable as unused otherwise compilation with -Db_ndebug=true complains about a set-but-not-used variable: ``` ../src/partition/repart.c:907:33: error: variable 'left' set but not used [-Werror,-Wunused-but-set-variable] uint64_t start, left; ^ 1 error generated. ``` --- src/partition/repart.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/partition/repart.c b/src/partition/repart.c index bf6bac07c51..0d1eebec256 100644 --- a/src/partition/repart.c +++ b/src/partition/repart.c @@ -899,7 +899,8 @@ static void context_place_partitions(Context *context) { for (size_t i = 0; i < context->n_free_areas; i++) { FreeArea *a = context->free_areas[i]; - uint64_t start, left; + _unused_ uint64_t left; + uint64_t start; if (a->after) { assert(a->after->offset != UINT64_MAX); -- 2.47.3