Skip to content

Commit

Permalink
schbench: Fix GCC 9 warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Danny Lin <[email protected]>
  • Loading branch information
kdrag0n committed Aug 20, 2019
1 parent 67f9734 commit 8d075b3
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions schbench.c
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,6 @@ static void run_rps_thread(struct thread_data *worker_threads_mem)
unsigned long sleep_time;
/* total number of times we kicked a worker */
unsigned long total_wakes = 0;
int left;
int cur_tid = 0;
int i;

Expand All @@ -719,17 +718,15 @@ static void run_rps_thread(struct thread_data *worker_threads_mem)
usleep(sleep_time);

gettimeofday(&start, NULL);
left = nr_to_wake;

for (i = 0; i < nr_to_wake; i++) {
struct thread_data *worker;
struct request *old;

worker = worker_threads_mem + cur_tid % worker_threads;
cur_tid++;

request = allocate_request();
old = request_add(worker, request);
request_add(worker, request);
total_wakes++;
memcpy(&worker->wake_time, &start, sizeof(start));
fpost(&worker->futex);
Expand Down

0 comments on commit 8d075b3

Please sign in to comment.