summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-07-18 19:02:41 -0600
committerMinkyu Kang <mk7.kang@samsung.com>2021-07-27 10:34:27 +0900
commit35eab76494a78173ddf71f6e9ff9d9144048b7ee (patch)
tree4d11262fa20c1e03e6053ab98a508dbe03d78d01 /test
parent5e19f4aa138144c92b63e9e6f1f931ac9b0db3ef (diff)
downloadu-boot-35eab76494a78173ddf71f6e9ff9d9144048b7ee.tar.gz
test: Fix size_t formats in strlcat test
Some of the printf() formats do not match their types. Fix this. Reported-by: Minkyu Kang <mk7.kang@samsung.com> Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Diffstat (limited to 'test')
-rw-r--r--test/lib/strlcat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/lib/strlcat.c b/test/lib/strlcat.c
index ee61684c40..a0ec037388 100644
--- a/test/lib/strlcat.c
+++ b/test/lib/strlcat.c
@@ -48,7 +48,7 @@ static int do_test_strlcat(struct unit_test_state *uts, int line, size_t align1,
if (expected != actual) {
ut_failf(uts, __FILE__, line, __func__,
"strlcat(s2, s1, 2) == len2 < n ? min(len1 + len2, n) : n",
- "Expected %#lx (%ld), got %#lx (%ld)",
+ "Expected %#zx (%zd), got %#zx (%zd)",
expected, expected, actual, actual);
return CMD_RET_FAILURE;
}
@@ -66,7 +66,7 @@ static int do_test_strlcat(struct unit_test_state *uts, int line, size_t align1,
if (len2 < n && s2[i] != '\0') {
ut_failf(uts, __FILE__, line, __func__,
"n < len1 && s2[len2 + n] == '\\0'",
- "Expected s2[%ld] = '\\0', got %d ('%c')",
+ "Expected s2[%zd] = '\\0', got %d ('%c')",
i, s2[i], s2[i]);
return CMD_RET_FAILURE;
}