diff --git a/sysbench/db_driver.c b/sysbench/db_driver.c index d68e6fe..2432be3 100644 --- a/sysbench/db_driver.c +++ b/sysbench/db_driver.c @@ -392,6 +392,7 @@ db_result_set_t *db_execute(db_stmt_t *stmt) return rs; } + /* Return the number of rows in a result set */ diff --git a/sysbench/sb_timer.c b/sysbench/sb_timer.c index 8a5065f..fa90f46 100644 --- a/sysbench/sb_timer.c +++ b/sysbench/sb_timer.c @@ -21,6 +21,9 @@ #ifdef STDC_HEADERS # include +#endif + +#ifdef HAVE_STRING_H # include #endif diff --git a/sysbench/sysbench.c b/sysbench/sysbench.c index 2ad4d6c..67eae2c 100644 --- a/sysbench/sysbench.c +++ b/sysbench/sysbench.c @@ -147,8 +147,6 @@ static void print_header(void); static void print_usage(void); static void print_run_mode(sb_test_t *); -static void *report_thread_proc(void *arg); - #ifdef HAVE_ALARM static void sigalrm_handler(int sig) { @@ -405,9 +403,9 @@ static void *runner_thread(void *arg) sb_thread_ctxt_t *ctxt; sb_test_t *test; unsigned int thread_id; - long long pause_ns; long long period_ns = 0; long long jitter_ns = 0; + long long pause_ns; struct timespec target_tv, now_tv; ctxt = (sb_thread_ctxt_t *)arg; @@ -424,8 +422,8 @@ static void *runner_thread(void *arg) if (sb_globals.tx_rate > 0) { /* initialize tx_rate variables */ - period_ns = (long long) round(1000000000.0 / sb_globals.tx_rate * - sb_globals.num_threads); + period_ns = round(1000000000.0 / sb_globals.tx_rate * + sb_globals.num_threads); if (sb_globals.tx_jitter > 0) jitter_ns = sb_globals.tx_jitter * 1000; else @@ -494,7 +492,7 @@ static void *runner_thread(void *arg) /* Intermediate reports thread */ -void *report_thread_proc(void *arg) +static void *report_thread_proc(void *arg) { unsigned long long pause_ns; unsigned long long prev_ns;