From ce8697f978c5cbc7640d31055ff87de5a6665b01 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 28 Jan 2019 09:14:31 -0500 Subject: [PATCH] accel/translate-all: Convert a void* cast into an unsigned char* cast Strictly speaking, as far as the standard care, performing pointer arithmetic on a void* type is ill formed. This is a GNU extension that allows this. Instead, just use unsigned char* which preserves the same behavior. --- qemu/accel/tcg/translate-all.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu/accel/tcg/translate-all.c b/qemu/accel/tcg/translate-all.c index 556e4c50..618a1ed4 100644 --- a/qemu/accel/tcg/translate-all.c +++ b/qemu/accel/tcg/translate-all.c @@ -1404,7 +1404,7 @@ TranslationBlock *tb_gen_code(CPUState *cpu, if (unlikely(gen_code_size < 0)) { goto buffer_overflow; } - search_size = encode_search(tcg_ctx, tb, (void *)gen_code_buf + gen_code_size); + search_size = encode_search(tcg_ctx, tb, (unsigned char *)gen_code_buf + gen_code_size); if (unlikely(search_size < 0)) { goto buffer_overflow; }