Skip to content

Commit 18d885d

Browse files
tpamborcfriedt
authored andcommitted
tests: libc: thread: fix -Wformat errors
Cast uintptr_t to unsigned long long and adjust format specifier accordingly to ensure compatibility on both 32-bit and 64-bit architectures. Signed-off-by: Tim Pambor <[email protected]>
1 parent ecffdac commit 18d885d

File tree

1 file changed

+2
-1
lines changed
  • tests/lib/c_lib/thrd/src

1 file changed

+2
-1
lines changed

tests/lib/c_lib/thrd/src/thrd.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ ZTEST(libc_thrd, test_thrd_create_join)
7979

8080
zassert_equal(thrd_success, thrd_create(&thr, fun, &param));
8181
zassert_equal(thrd_success, thrd_join(thr, &res));
82-
zassert_equal(BIOS_FOOD, param, "expected: %d actual: %d", BIOS_FOOD, param);
82+
zassert_equal(BIOS_FOOD, param, "expected: %u actual: %llu", BIOS_FOOD,
83+
(unsigned long long)param);
8384
zassert_equal(FORTY_TWO, res);
8485
}
8586

0 commit comments

Comments
 (0)