diff --git a/tests/subsys/shell/shell/src/main.c b/tests/subsys/shell/shell/src/main.c index e5bc7d734beff..ac8ccb25277d3 100644 --- a/tests/subsys/shell/shell/src/main.c +++ b/tests/subsys/shell/shell/src/main.c @@ -333,7 +333,7 @@ ZTEST(sh, test_shell_fprintf) shell_fprintf(sh, SHELL_VT100_COLOR_DEFAULT, "testing %d %s %c", 1, "2", '3'); buf = shell_backend_dummy_get_output(sh, &size); - zassert_true(size >= sizeof(expect), "Expected size > %u, got %d", + zassert_true(size >= sizeof(expect), "Expected size > %zu, got %zu", sizeof(expect), size); /* diff --git a/tests/subsys/shell/shell_custom_header/src/main.c b/tests/subsys/shell/shell_custom_header/src/main.c index 81fd71dd06bb3..7c03e3863129c 100644 --- a/tests/subsys/shell/shell_custom_header/src/main.c +++ b/tests/subsys/shell/shell_custom_header/src/main.c @@ -44,7 +44,7 @@ ZTEST(sh, test_shell_fprintf) shell_fprintf(sh, SHELL_VT100_COLOR_DEFAULT, "testing %d %s %c", 1, "2", '3'); buf = shell_backend_dummy_get_output(sh, &size); - zassert_true(size >= sizeof(expect), "Expected size > %u, got %d", + zassert_true(size >= sizeof(expect), "Expected size > %zu, got %zu", sizeof(expect), size); /*