From: Jerome Benoit Date: Fri, 28 Jun 2024 20:51:42 +0000 (+0000) Subject: upstream: silence unused-but-set-variable warnings: benchmarks X-Git-Tag: archive/raspbian/0.10.13+ds-1+rpi1^2~5 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=a69020cfcacaa814f20c9681c122fe12db0861b6;p=igraph.git 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 --- 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);