diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2007-05-24 18:54:10 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2007-05-24 18:54:10 +0000 |
commit | a868e24660357d6f214511198e47bd0962dfdc5d (patch) | |
tree | 47dca152c0b7066a2b8250b1a9c6c57e8d4ba06c | |
parent | 4e3cb9ca48bad5044624de060983cc593603394d (diff) | |
download | postgresql-a868e24660357d6f214511198e47bd0962dfdc5d.tar.gz postgresql-a868e24660357d6f214511198e47bd0962dfdc5d.zip |
Avoid assuming that the fields of struct timeval have exactly type long.
This is probably incorrect on some platforms, and definitely draws a
compiler warning on Darwin.
-rw-r--r-- | contrib/pgbench/pgbench.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/contrib/pgbench/pgbench.c b/contrib/pgbench/pgbench.c index 9bab53c940b..2de6a51b053 100644 --- a/contrib/pgbench/pgbench.c +++ b/contrib/pgbench/pgbench.c @@ -1,5 +1,5 @@ /* - * $PostgreSQL: pgsql/contrib/pgbench/pgbench.c,v 1.65 2007/04/08 01:15:07 ishii Exp $ + * $PostgreSQL: pgsql/contrib/pgbench/pgbench.c,v 1.66 2007/05/24 18:54:10 tgl Exp $ * * pgbench: a simple benchmark program for PostgreSQL * written by Tatsuo Ishii @@ -476,7 +476,8 @@ top: (int) (now.tv_usec - st->txn_begin.tv_usec); fprintf(LOGFILE, "%d %d %.0f %d %ld %ld\n", - st->id, st->cnt, diff, st->use_file, now.tv_sec,now.tv_usec); + st->id, st->cnt, diff, st->use_file, + (long) now.tv_sec, (long) now.tv_usec); } if (commands[st->state]->type == SQL_COMMAND) |