summaryrefslogtreecommitdiff
path: root/lib/test_printf.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2022-11-03 01:50:05 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2022-11-19 00:56:15 +0100
commit0445d1bae1cce00ae4e99c8cde33784a8199bad6 (patch)
tree6170247bbe5e117550440b6d508a520606cbc245 /lib/test_printf.c
parent3bc753c06dd02a3517c9b498e3846ebfc94ac3ee (diff)
lib: assume char is unsigned
Now that we use -funsigned-char, there's no need for this kind of ifdef. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'lib/test_printf.c')
-rw-r--r--lib/test_printf.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/lib/test_printf.c b/lib/test_printf.c
index 4bd15a593fbd..5eb889679e4f 100644
--- a/lib/test_printf.c
+++ b/lib/test_printf.c
@@ -179,18 +179,6 @@ test_number(void)
* behaviour.
*/
test("00|0|0|0|0", "%.2d|%.1d|%.0d|%.*d|%1.0d", 0, 0, 0, 0, 0, 0);
-#ifndef __CHAR_UNSIGNED__
- {
- /*
- * Passing a 'char' to a %02x specifier doesn't do
- * what was presumably the intention when char is
- * signed and the value is negative. One must either &
- * with 0xff or cast to u8.
- */
- char val = -16;
- test("0xfffffff0|0xf0|0xf0", "%#02x|%#02x|%#02x", val, val & 0xff, (u8)val);
- }
-#endif
}
static void __init