From b29f0a30bd2eba662845091b60c127ea5cb4c6e3 Mon Sep 17 00:00:00 2001 From: tb <> Date: Sun, 13 Apr 2025 07:12:19 +0000 Subject: Avoid compiler warning on some OS Some OS declare arc4random() with __attribute__((warn_unused_result)) causing this test to whine. So explicitly ignore the return value. Reported by scheiba in libressl/portable Fixes #1151 --- src/regress/lib/libc/arc4random-fork/arc4random-fork.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/regress/lib/libc/arc4random-fork/arc4random-fork.c b/src/regress/lib/libc/arc4random-fork/arc4random-fork.c index 4bc9c634f1..9b334945af 100644 --- a/src/regress/lib/libc/arc4random-fork/arc4random-fork.c +++ b/src/regress/lib/libc/arc4random-fork/arc4random-fork.c @@ -111,7 +111,7 @@ main(int argc, char *argv[]) } if (flagprefork) - arc4random(); + (void)arc4random(); bufparent = mmap(NULL, sizeof(Buf), PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE, -1, 0); -- cgit v1.2.3-55-g6feb