[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 06/40] tests/tcg/minilib: Constify digits in print_num
From: |
Alex Bennée |
Subject: |
[PULL 06/40] tests/tcg/minilib: Constify digits in print_num |
Date: |
Fri, 5 Jul 2024 16:30:18 +0100 |
From: Richard Henderson <richard.henderson@linaro.org>
This avoids a memcpy to the stack when compiled with clang.
Since we don't enable optimization, nor provide memcpy,
this results in an undefined symbol error at link time.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Message-Id: <20240630190050.160642-2-richard.henderson@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20240705084047.857176-7-alex.bennee@linaro.org>
diff --git a/tests/tcg/minilib/printf.c b/tests/tcg/minilib/printf.c
index 10472b4f58..fb0189c2bb 100644
--- a/tests/tcg/minilib/printf.c
+++ b/tests/tcg/minilib/printf.c
@@ -27,7 +27,7 @@ static void print_str(char *s)
static void print_num(unsigned long long value, int base)
{
- char digits[] = "0123456789abcdef";
+ static const char digits[] = "0123456789abcdef";
char buf[32];
int i = sizeof(buf) - 2, j;
--
2.39.2
- [PULL 00/40] maintainer updates for testing, plugins and gdbstub, Alex Bennée, 2024/07/05
- [PULL 05/40] tests/docker: Specify --userns keep-id for Podman, Alex Bennée, 2024/07/05
- [PULL 01/40] tests/lcitool: fix debian-i686-cross toolchain prefix, Alex Bennée, 2024/07/05
- [PULL 06/40] tests/tcg/minilib: Constify digits in print_num,
Alex Bennée <=
- [PULL 12/40] tests/tcg/aarch64: Add -fno-integrated-as for sme, Alex Bennée, 2024/07/05
- [PULL 03/40] tracepoints: move physmem trace points, Alex Bennée, 2024/07/05
- [PULL 02/40] testing: restore some testing for i686, Alex Bennée, 2024/07/05
- [PULL 04/40] hw/core: ensure kernel_end never gets used undefined, Alex Bennée, 2024/07/05
- [PULL 07/40] tests/tcg: Adjust variable defintion from cc-option, Alex Bennée, 2024/07/05
- [PULL 10/40] tests/tcg/aarch64: Fix irg operand type, Alex Bennée, 2024/07/05
- [PULL 13/40] tests/tcg/arm: Fix fcvt result messages, Alex Bennée, 2024/07/05
- [PULL 08/40] tests/tcg/aarch64: Drop -fno-tree-loop-distribute-patterns, Alex Bennée, 2024/07/05
- [PULL 09/40] tests/tcg/aarch64: Explicitly specify register width, Alex Bennée, 2024/07/05
- [PULL 15/40] tests/tcg/arm: Use -fno-integrated-as for test-arm-iwmmxt, Alex Bennée, 2024/07/05