mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 15:14:43 +00:00
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>
This commit is contained in:
parent
5e19f4aa13
commit
35eab76494
1 changed files with 2 additions and 2 deletions
|
@ -48,7 +48,7 @@ static int do_test_strlcat(struct unit_test_state *uts, int line, size_t align1,
|
||||||
if (expected != actual) {
|
if (expected != actual) {
|
||||||
ut_failf(uts, __FILE__, line, __func__,
|
ut_failf(uts, __FILE__, line, __func__,
|
||||||
"strlcat(s2, s1, 2) == len2 < n ? min(len1 + len2, n) : n",
|
"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);
|
expected, expected, actual, actual);
|
||||||
return CMD_RET_FAILURE;
|
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') {
|
if (len2 < n && s2[i] != '\0') {
|
||||||
ut_failf(uts, __FILE__, line, __func__,
|
ut_failf(uts, __FILE__, line, __func__,
|
||||||
"n < len1 && s2[len2 + n] == '\\0'",
|
"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]);
|
i, s2[i], s2[i]);
|
||||||
return CMD_RET_FAILURE;
|
return CMD_RET_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue