Thomas Weißschuh
9291f9de77
selftests/nolibc: fix printf format mismatch in expect_str_buf_eq()
...
commit 92098b1c10cb29bcc6fa0908a766dc9e16b1e889 upstream.
Fix the following compiler warning on 32bit:
i386-linux-gcc -Os -fno-ident -fno-asynchronous-unwind-tables -std=c89 -W -Wall -Wextra -fno-stack-protector -m32 -mstack-protector-guard=global -fstack-protector-all -o nolibc-test \
-nostdlib -nostdinc -static -Isysroot/i386/include nolibc-test.c nolibc-test-linkage.c -lgcc
nolibc-test.c: In function 'expect_str_buf_eq':
nolibc-test.c:610:30: error: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'size_t' {aka 'unsigned int'} [-Werror=format=]
610 | llen += printf(" = %lu <%s> ", expr, buf);
| ~~^ ~~~~
| | |
| | size_t {aka unsigned int}
| long unsigned int
| %u
Fixes: 1063649cf531 ("selftests/nolibc: Add tests for strlcat() and strlcpy()")
Cc: stable@vger.kernel.org
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-03 09:00:33 +02:00
..
2024-06-04 16:46:40 -03:00
2024-08-03 08:59:42 +02:00
2024-04-25 20:56:15 -07:00
2024-05-28 05:27:35 +00:00
2024-06-09 09:04:51 -07:00
2024-08-03 08:59:40 +02:00
2024-05-13 14:59:24 -07:00
2024-08-03 08:59:12 +02:00
2024-08-03 09:00:05 +02:00
2024-06-27 23:53:27 -04:00
2024-04-21 09:58:17 +09:00
2024-08-03 09:00:33 +02:00
2024-05-23 10:46:01 -04:00
2024-03-20 05:39:06 +01:00
2024-03-25 10:11:32 -10:00
2024-05-05 17:53:51 -07:00
2024-03-26 11:07:21 -07:00