From: Bruno Haible Date: Mon, 4 Sep 2023 21:32:22 +0000 (+0200) Subject: bitset, nonblocking-* tests: Fix gcc -Wunused-but-set-variable warnings. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=8dad152c7766934ed3f89d7a5f57cfe0f0df7d3a;p=gnulib.git bitset, nonblocking-* tests: Fix gcc -Wunused-but-set-variable warnings. * tests/test-bitset.c (check_zero): Mark 'i' as possibly unused. * tests/test-nonblocking-reader.h (full_read): Mark 'spent_time' as possibly unused. --- diff --git a/ChangeLog b/ChangeLog index 383aa5162f..6fabc01bc5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2023-09-04 Bruno Haible + + bitset, nonblocking-* tests: Fix gcc -Wunused-but-set-variable warnings. + * tests/test-bitset.c (check_zero): Mark 'i' as possibly unused. + * tests/test-nonblocking-reader.h (full_read): Mark 'spent_time' as + possibly unused. + 2023-09-04 Bruno Haible pipe-filter-gi, pipe-filter-ii tests: Fix some gcc -Wshadow warnings. diff --git a/tests/test-bitset.c b/tests/test-bitset.c index 8c1d6aee7b..b1250d53fe 100644 --- a/tests/test-bitset.c +++ b/tests/test-bitset.c @@ -274,7 +274,7 @@ check_zero (bitset bs) /* FOR_EACH. */ { bitset_iterator iter; - bitset_bindex i; + _GL_UNUSED bitset_bindex i; BITSET_FOR_EACH (iter, bs, i, 0) ASSERT (0); BITSET_FOR_EACH_REVERSE (iter, bs, i, 0) diff --git a/tests/test-nonblocking-reader.h b/tests/test-nonblocking-reader.h index e6f7a3da45..e9076497d4 100644 --- a/tests/test-nonblocking-reader.h +++ b/tests/test-nonblocking-reader.h @@ -74,6 +74,7 @@ full_read (size_t fd, void *buf, size_t count) END_TIMING dbgfprintf (stderr, "%s: << read -> %ld%s\n", PROG_ROLE, (long) ret, dbgstrerror (ret < 0, saved_errno)); + (void) spent_time; if (ret < 0) return -1; else