diff options
author | tb <> | 2025-04-13 07:12:19 +0000 |
---|---|---|
committer | tb <> | 2025-04-13 07:12:19 +0000 |
commit | b29f0a30bd2eba662845091b60c127ea5cb4c6e3 (patch) | |
tree | bab19551b3f20518befa130bf4bb2c78f643ef7f /src/regress/lib/libc/arc4random-fork/arc4random-fork.c | |
parent | d823f169e68973ca6dac6c0a85568eff05339694 (diff) | |
download | openbsd-b29f0a30bd2eba662845091b60c127ea5cb4c6e3.tar.gz openbsd-b29f0a30bd2eba662845091b60c127ea5cb4c6e3.tar.bz2 openbsd-b29f0a30bd2eba662845091b60c127ea5cb4c6e3.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.c | 2 |
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); |