Skip to content

Commit 5b01615

Browse files
tpamborjhedberg
authored andcommitted
tests: zdsp: Correct format specifier in assert_strings
strlen returns size_t, not int. Fix the format specifier to avoid warnings when building with -Wformat. Signed-off-by: Tim Pambor <[email protected]>
1 parent ef73155 commit 5b01615

File tree

1 file changed

+1
-1
lines changed
  • tests/subsys/dsp/print_format/src

1 file changed

+1
-1
lines changed

tests/subsys/dsp/print_format/src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#define float_multiplier(type) ((INT64_C(1) << (8 * sizeof(type) - 1)) - 1)
1010

1111
#define assert_strings(expected, actual) \
12-
zexpect_equal(strlen(expected), strlen(actual), "Expected %d(%s), got %d(%s)", \
12+
zexpect_equal(strlen(expected), strlen(actual), "Expected %zu(%s), got %zu(%s)", \
1313
strlen(expected), expected, strlen(actual), actual); \
1414
zexpect_mem_equal(expected, actual, MIN(strlen(expected), strlen(actual)), \
1515
"Expected '%s', got '%s'", expected, actual)

0 commit comments

Comments
 (0)