From e8f0e66bc4281fec4f7489b8fc54f488761ab91c Mon Sep 17 00:00:00 2001 From: Andrei Emeltchenko Date: Thu, 5 Jan 2023 13:06:21 +0200 Subject: [PATCH] tests: libc: Fix "unused" type of warnings Follow example several lines below and fix warnings from static tools. Signed-off-by: Andrei Emeltchenko --- tests/lib/c_lib/src/test_strerror.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tests/lib/c_lib/src/test_strerror.c b/tests/lib/c_lib/src/test_strerror.c index 62994d401ae..fff3d5e1d0d 100644 --- a/tests/lib/c_lib/src/test_strerror.c +++ b/tests/lib/c_lib/src/test_strerror.c @@ -18,15 +18,12 @@ ZTEST(test_c_lib, test_strerror) if (IS_ENABLED(CONFIG_MINIMAL_LIBC_DISABLE_STRING_ERROR_TABLE)) { expected = ""; actual = strerror(EINVAL); - - zassert_equal(0, strcmp("", strerror(EINVAL)), ""); } else { expected = "Invalid argument"; actual = strerror(EINVAL); - - zassert_equal(0, strcmp(expected, actual), - "mismatch: exp: %s act: %s", expected, actual); } + zassert_equal(0, strcmp(expected, actual), + "mismatch: exp: %s act: %s", expected, actual); /* do not change errno on success */ zassert_equal(4242, errno, "");