sprintf() is deprecated on Darwin since macOS 13.0 / XCode 14.1,
resulting in painful developper experience.
Since they are very few register names, use const arrays instead
of trying to be clever generating the names. This silences:
[2/8] Compiling C object libqemu-m68k-softmmu.fa.p/target_m68k_translate.c.o
target/m68k/translate.c:92:9: warning: 'sprintf' is deprecated:
This function is provided for compatibility reasons only.
Due to security concerns inherent in the design of sprintf(3),
it is highly recommended that you use snprintf(3) instead.
[-Wdeprecated-declarations]
sprintf(p, "D%d", i);
^
sprintf(p, "A%d", i);
^
sprintf(p, "ACC%d", i);
^
Signed-off-by: Philippe Mathieu-Daudé<philmd@linaro.org>
---
target/m68k/translate.c | 27 +++++++++++++++------------
1 file changed, 15 insertions(+), 12 deletions(-)