From 0c303d61e08a306b6f373a09fef132f5580a2820 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Tue, 10 Jan 2023 08:00:59 -0800 Subject: [PATCH] sparse BinaryHeap_sanity_check: squash warnings in release mode This code triggered -Wunused-variable warnings. --- lib/sparse/BinaryHeap.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/sparse/BinaryHeap.c b/lib/sparse/BinaryHeap.c index 36467f2b2..da3a9917c 100644 --- a/lib/sparse/BinaryHeap.c +++ b/lib/sparse/BinaryHeap.c @@ -244,6 +244,8 @@ void BinaryHeap_sanity_check(BinaryHeap h){ for (size_t i = 1; i < h->len; i++){ size_t parentPos = ParentPos(i); assert((h->cmp)(heap[i], heap[parentPos]) >= 0); + (void)heap; + (void)parentPos; } mask = CALLOC(h->len + int_stack_size(&h->id_stack), sizeof(mask[0])); @@ -263,6 +265,7 @@ void BinaryHeap_sanity_check(BinaryHeap h){ assert(mask[pos_to_id[i]] == 0);/* that id is in use so can't be spare */ mask[pos_to_id[i]] = 1; assert(id_to_pos[pos_to_id[i]] == i); + (void)id_to_pos; } /* all IDs, spare or in use, are accounted for and give a contiguous set */ -- 2.40.0