summaryrefslogtreecommitdiff
path: root/src/regress/lib/libc/arc4random-fork/arc4random-fork.c
diff options
context:
space:
mode:
authortb <>2025-04-13 07:12:19 +0000
committertb <>2025-04-13 07:12:19 +0000
commit147f6f7266ff1826c097c67f3de5bf3fe78b85da (patch)
treebab19551b3f20518befa130bf4bb2c78f643ef7f /src/regress/lib/libc/arc4random-fork/arc4random-fork.c
parentc3b500ab309a358fdb98b0f8e59b93f048d08b83 (diff)
downloadopenbsd-147f6f7266ff1826c097c67f3de5bf3fe78b85da.tar.gz
openbsd-147f6f7266ff1826c097c67f3de5bf3fe78b85da.tar.bz2
openbsd-147f6f7266ff1826c097c67f3de5bf3fe78b85da.zip
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
Diffstat (limited to 'src/regress/lib/libc/arc4random-fork/arc4random-fork.c')
-rw-r--r--src/regress/lib/libc/arc4random-fork/arc4random-fork.c2
1 files changed, 1 insertions, 1 deletions
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[])
111 } 111 }
112 112
113 if (flagprefork) 113 if (flagprefork)
114 arc4random(); 114 (void)arc4random();
115 115
116 bufparent = mmap(NULL, sizeof(Buf), PROT_READ|PROT_WRITE, 116 bufparent = mmap(NULL, sizeof(Buf), PROT_READ|PROT_WRITE,
117 MAP_ANON|MAP_PRIVATE, -1, 0); 117 MAP_ANON|MAP_PRIVATE, -1, 0);