Skip to content

Commit 244aecf

Browse files
nordic-krchMaureenHelm
authored andcommitted
tests: drivers: counter: Fix coverity issue (190952)
Fix issue reported by coverity regarding using volatile variables in zassert_equal macro. Signed-off-by: Krzysztof Chruscinski <[email protected]>
1 parent e318401 commit 244aecf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/drivers/counter/counter_basic_api/src/test_counter.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,9 @@ void test_set_top_value_with_alarm_instance(const char *dev_name)
141141

142142
k_busy_wait(5.2*COUNTER_PERIOD_US);
143143

144-
zassert_true(top_cnt == 5,
144+
zassert_true((u32_t)top_cnt == 5,
145145
"Unexpected number of turnarounds (%d) (dev: %s).\n",
146-
top_cnt, dev_name);
146+
(u32_t)top_cnt, dev_name);
147147
}
148148

149149
void test_set_top_value_with_alarm(void)

0 commit comments

Comments
 (0)