Skip to content

Commit

Permalink
testsuite: ztress: Remove idle thread NULL check
Browse files Browse the repository at this point in the history
This commit removes the NULL check on the idle thread array
(`idle_tid`) because it is statically declared and will never be NULL.

This fixes the "comparison will always evaluate as ‘false’" warning
generated by the GCC 12.

Signed-off-by: Stephanos Ioannidis <[email protected]>
  • Loading branch information
stephanosio committed Jul 29, 2022
1 parent c8933d0 commit 33cbd84
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions subsys/testsuite/ztest/src/ztress.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,10 +290,6 @@ static void ztress_init(struct ztress_context_data *thread_data)
k_thread_foreach(thread_cb, NULL);
k_msleep(10);

if (idle_tid == NULL) {
printk("Failed to identify idle thread. CPU load will not be tracked\n");
}

k_timer_start(&ctrl_timer, K_MSEC(100), K_MSEC(100));
k_timer_user_data_set(&progress_timer, thread_data);
k_timer_start(&progress_timer,
Expand Down

0 comments on commit 33cbd84

Please sign in to comment.