Skip to content

Commit f5fa9b4

Browse files
committed
stress-workload: clean up duplicate stress_workload_waste_time call warning
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
1 parent e3a5c93 commit f5fa9b4

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

stress-workload.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -462,8 +462,8 @@ static int stress_workload_exercise(
462462
}
463463
stress_workload_bucket_account(slice_offset_bucket, STRESS_DBL_MICROSECOND * (stress_time_now() - t_begin));
464464
if (run_duration_sec > 0.0) {
465-
if (workload_threads) {
466465
#if defined(WORKLOAD_THREADED)
466+
if (workload_threads) {
467467
double sleep_secs;
468468

469469
if (i == (max_quanta - 1)) {
@@ -474,12 +474,14 @@ static int stress_workload_exercise(
474474
(void)mq_send(mq, (const char *)&workload[i], sizeof(workload[i]), 0);
475475
if (sleep_secs > 0.0)
476476
(void)shim_nanosleep_uint64((uint64_t)(sleep_secs * STRESS_DBL_NANOSECOND));
477-
#else
478477
stress_workload_waste_time(args->name, workload_method, run_duration_sec, buffer, buffer_len);
479-
#endif
480478
} else {
481479
stress_workload_waste_time(args->name, workload_method, run_duration_sec, buffer, buffer_len);
482480
}
481+
#else
482+
(void)workload_threads;
483+
stress_workload_waste_time(args->name, workload_method, run_duration_sec, buffer, buffer_len);
484+
#endif
483485
}
484486
stress_bogo_inc(args);
485487
}

0 commit comments

Comments
 (0)