From 8c9e4f680d87fe084d22bc23f409e5c10f61e103 Mon Sep 17 00:00:00 2001
From: Fred Wright <fw@fwright.net>
Date: Sat, 5 Oct 2024 19:53:11 -0700
Subject: [PATCH] test_arc4random: Fix warning.

The result of a function being tested is discarded, which produces a
"set but not used" warning from some compilers.  We add a void cast to
avoid this.

TESTED:
Previously present warnings are now gone.
---
 test/test_arc4random.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/test_arc4random.c b/test/test_arc4random.c
index 5399e90..724d6f7 100644
--- a/test/test_arc4random.c
+++ b/test/test_arc4random.c
@@ -64,7 +64,7 @@ bench(int fd, size_t siz, size_t niter)
         s0 = sys_cpu_timestamp();
         arc4random_buf(buf, siz);
         s1 = sys_cpu_timestamp();
-        m  =  read(fd, buf, siz);
+        m  =  read(fd, buf, siz); (void) m;
         s2 = sys_cpu_timestamp();
 
         ta += s1 - s0;
-- 
GitLab