mirror of
https://github.com/Dasharo/zephyr.git
synced 2026-03-06 14:57:20 -08:00
tests: kernel: timer: fix coverity side expression complaint
Capture the value of the volatile variable outside the assert and use the captured value in the assert. Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
This commit is contained in:
@@ -80,9 +80,11 @@ static void test_starve(void)
|
||||
tag(), -(s32_t)ticks_diff);
|
||||
last_ticks = ticks;
|
||||
|
||||
zassert_equal(na, 0,
|
||||
u32_t na_capture = na;
|
||||
|
||||
zassert_equal(na_capture, 0,
|
||||
"%sTimer alarm fired: %u\n",
|
||||
na);
|
||||
na_capture);
|
||||
|
||||
k_timer_start(&tmr, K_MSEC(TIMER_DELAY_ms), K_NO_WAIT);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user