]> Savannah Git Hosting - gnulib.git/commitdiff
bitset, nonblocking-* tests: Fix gcc -Wunused-but-set-variable warnings.
authorBruno Haible <bruno@clisp.org>
Mon, 4 Sep 2023 21:32:22 +0000 (23:32 +0200)
committerBruno Haible <bruno@clisp.org>
Thu, 14 Sep 2023 10:12:54 +0000 (12:12 +0200)
* tests/test-bitset.c (check_zero): Mark 'i' as possibly unused.
* tests/test-nonblocking-reader.h (full_read): Mark 'spent_time' as
possibly unused.

ChangeLog
tests/test-bitset.c
tests/test-nonblocking-reader.h

index 383aa5162fc68b028698f7052ee77893d8d072cf..6fabc01bc5d83ddd4244df1f9a5695ff1258d6eb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2023-09-04  Bruno Haible  <bruno@clisp.org>
+
+       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  <bruno@clisp.org>
 
        pipe-filter-gi, pipe-filter-ii tests: Fix some gcc -Wshadow warnings.
index 8c1d6aee7b192d1bc2d92b7babe3dc9fb28cb846..b1250d53fe34245cb36777be8ffef1a4e27465e4 100644 (file)
@@ -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)
index e6f7a3da4549a473e43bc6f657ebdf862317ccc4..e9076497d47d980b4876fcf3c8dbe92ed42ede1c 100644 (file)
@@ -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