projects
/
users
/
simon
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
46d0307
)
Avoid assuming that the fields of struct timeval have exactly type long.
author
Tom Lane
<tgl@sss.pgh.pa.us>
Thu, 24 May 2007 18:54:10 +0000
(18:54 +0000)
committer
Tom Lane
<tgl@sss.pgh.pa.us>
Thu, 24 May 2007 18:54:10 +0000
(18:54 +0000)
This is probably incorrect on some platforms, and definitely draws a
compiler warning on Darwin.
contrib/pgbench/pgbench.c
patch
|
blob
|
blame
|
history
diff --git
a/contrib/pgbench/pgbench.c
b/contrib/pgbench/pgbench.c
index 68527a77eb242c980f743850435e895635990ca3..001b51936609691c71863702124bd4d5a8850fd8 100644
(file)
--- a/
contrib/pgbench/pgbench.c
+++ b/
contrib/pgbench/pgbench.c
@@
-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)