From 315de1248bab0dcf4bb40f14949f26f9ccc676a1 Mon Sep 17 00:00:00 2001 From: Jerome Benoit Date: Mon, 15 Jul 2024 21:11:34 +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