Skip to content

Commit ee8bb8d

Browse files
dcpleungnashif
authored andcommitted
tests: timer_api: unused var when CONFIG_ZTEST_ASSERT_VERBOSE=0
When CONFIG_ZTEST_ASSERT_VERBOSE is 0, the array round_s is not being used by zassert_true(). So mark it __maybe_unused to avoid compiler warnings. Signed-off-by: Daniel Leung <[email protected]>
1 parent 53c79c6 commit ee8bb8d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/kernel/timer/timer_api/src/timer_convert.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ enum units { UNIT_ticks, UNIT_cyc, UNIT_ms, UNIT_us, UNIT_ns };
1414

1515
enum round { ROUND_floor, ROUND_ceil, ROUND_near };
1616

17-
static const char *const round_s[] = {
17+
static const char *const round_s[] __maybe_unused = {
1818
[ROUND_floor] = "floor",
1919
[ROUND_ceil] = "ceil",
2020
[ROUND_near] = "near",

0 commit comments

Comments
 (0)