From a69020cfcacaa814f20c9681c122fe12db0861b6 Mon Sep 17 00:00:00 2001 From: Jerome Benoit Date: Fri, 28 Jun 2024 20:51:42 +0000 Subject: [PATCH] upstream: silence unused-but-set-variable warnings: benchmarks Origin: debian Forwarded: https://github.com/igraph/igraph/pull/2640 Last-Update: 2024-06-28 This patch silences a unused-but-set-variable warning as detected by gcc (Debian 13.3.0-1) in `tests/benchmarks/intersection.c'. It is meant to be submitted to the upstream maintainer. Gbp-Pq: Name upstream-silence-tests-benchmarks-unused_but_set_variable.patch --- tests/benchmarks/intersection.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/benchmarks/intersection.c b/tests/benchmarks/intersection.c index c08a7f5..e1dad29 100644 --- a/tests/benchmarks/intersection.c +++ b/tests/benchmarks/intersection.c @@ -34,6 +34,7 @@ void run_bench(int i, int n, int r) { * with future compiler versions. */ volatile igraph_integer_t res; BENCH(msg, REPEAT(res = igraph_vector_int_intersection_size_sorted(&a, &b), rep)); + (void) res; /* silence unused-but-set-variable warning */ igraph_vector_int_destroy(&a); igraph_vector_int_destroy(&b); -- 2.30.2