Skip to content

Commit 55f100e

Browse files
committed
pgbench: Silence compiler warning
Explicitly ignore return value from write(), to silence warning. This warning only appeared under --disable-thread-safety.
1 parent 8182ffd commit 55f100e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

contrib/pgbench/pgbench.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2950,6 +2950,7 @@ pthread_create(pthread_t *thread,
29502950
{
29512951
fork_pthread *th;
29522952
void *ret;
2953+
int rc;
29532954

29542955
th = (fork_pthread *) pg_malloc(sizeof(fork_pthread));
29552956
if (pipe(th->pipes) < 0)
@@ -2979,7 +2980,8 @@ pthread_create(pthread_t *thread,
29792980
setalarm(duration);
29802981

29812982
ret = start_routine(arg);
2982-
write(th->pipes[1], ret, sizeof(TResult));
2983+
rc = write(th->pipes[1], ret, sizeof(TResult));
2984+
(void) rc;
29832985
close(th->pipes[1]);
29842986
free(th);
29852987
exit(0);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy