diff options
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/pg_test_fsync/pg_test_fsync.c | 1 | ||||
-rw-r--r-- | contrib/pg_test_timing/pg_test_timing.c | 1 | ||||
-rw-r--r-- | contrib/pgbench/pgbench.c | 18 |
3 files changed, 11 insertions, 9 deletions
diff --git a/contrib/pg_test_fsync/pg_test_fsync.c b/contrib/pg_test_fsync/pg_test_fsync.c index efa1b3284ec..ec4b90c7974 100644 --- a/contrib/pg_test_fsync/pg_test_fsync.c +++ b/contrib/pg_test_fsync/pg_test_fsync.c @@ -140,6 +140,7 @@ handle_args(int argc, char *argv[]) {"secs-per-test", required_argument, NULL, 's'}, {NULL, 0, NULL, 0} }; + int option; /* Command line option */ int optindex = 0; /* used by getopt_long */ diff --git a/contrib/pg_test_timing/pg_test_timing.c b/contrib/pg_test_timing/pg_test_timing.c index 8d79c7bd74f..191c621376e 100644 --- a/contrib/pg_test_timing/pg_test_timing.c +++ b/contrib/pg_test_timing/pg_test_timing.c @@ -43,6 +43,7 @@ handle_args(int argc, char *argv[]) {"duration", required_argument, NULL, 'd'}, {NULL, 0, NULL, 0} }; + int option; /* Command line option */ int optindex = 0; /* used by getopt_long */ diff --git a/contrib/pgbench/pgbench.c b/contrib/pgbench/pgbench.c index 090c21019e6..e3764522280 100644 --- a/contrib/pgbench/pgbench.c +++ b/contrib/pgbench/pgbench.c @@ -1915,6 +1915,15 @@ printResults(int ttype, int normal_xacts, int nclients, int main(int argc, char **argv) { + static struct option long_options[] = { + {"foreign-keys", no_argument, &foreign_keys, 1}, + {"index-tablespace", required_argument, NULL, 3}, + {"tablespace", required_argument, NULL, 2}, + {"unlogged-tables", no_argument, &unlogged_tables, 1}, + {"sampling-rate", required_argument, NULL, 4}, + {NULL, 0, NULL, 0} + }; + int c; int nclients = 1; /* default number of simulated clients */ int nthreads = 1; /* default number of threads */ @@ -1937,15 +1946,6 @@ main(int argc, char **argv) int i; - static struct option long_options[] = { - {"foreign-keys", no_argument, &foreign_keys, 1}, - {"index-tablespace", required_argument, NULL, 3}, - {"tablespace", required_argument, NULL, 2}, - {"unlogged-tables", no_argument, &unlogged_tables, 1}, - {"sampling-rate", required_argument, NULL, 4}, - {NULL, 0, NULL, 0} - }; - #ifdef HAVE_GETRLIMIT struct rlimit rlim; #endif |