]> granicus.if.org Git - postgresql/commitdiff
pgbench: Silence compiler warning
authorPeter Eisentraut <peter_e@gmx.net>
Sun, 7 Jul 2013 11:25:39 +0000 (07:25 -0400)
committerPeter Eisentraut <peter_e@gmx.net>
Sun, 7 Jul 2013 11:27:22 +0000 (07:27 -0400)
Explicitly ignore return value from write(), to silence warning.  This
warning only appeared under --disable-thread-safety.

contrib/pgbench/pgbench.c

index 80203d66d17b4a44ddcfd5d95693fb549d5ea080..8dc81e533359e8a77fc30f3159daed217bc0c13c 100644 (file)
@@ -2950,6 +2950,7 @@ pthread_create(pthread_t *thread,
 {
        fork_pthread *th;
        void       *ret;
+       int                     rc;
 
        th = (fork_pthread *) pg_malloc(sizeof(fork_pthread));
        if (pipe(th->pipes) < 0)
@@ -2979,7 +2980,8 @@ pthread_create(pthread_t *thread,
                setalarm(duration);
 
        ret = start_routine(arg);
-       write(th->pipes[1], ret, sizeof(TResult));
+       rc = write(th->pipes[1], ret, sizeof(TResult));
+       (void) rc;
        close(th->pipes[1]);
        free(th);
        exit(0);