Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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

+3-1
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)