From 6b702a990554163eebceea9a0267ad75ed9466aa Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 30 Jan 2019 13:01:59 -0500 Subject: [PATCH] tcg: Convert void* casts to char* in temp_tcgv_i32() Gets rid of the use of a GNU extension that allows arithmetic on void pointers. This is equivalent to doing arithmetic on char/unsigned char pointers. --- qemu/tcg/tcg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu/tcg/tcg.h b/qemu/tcg/tcg.h index f07ac633..e5e1319c 100644 --- a/qemu/tcg/tcg.h +++ b/qemu/tcg/tcg.h @@ -1004,7 +1004,7 @@ static inline TCGArg tcgv_vec_arg(TCGContext *s, TCGv_vec v) static inline TCGv_i32 temp_tcgv_i32(TCGContext *s, TCGTemp *t) { (void)temp_idx(s, t); /* trigger embedded assert */ - return (TCGv_i32)((void *)t - (void *)s); + return (TCGv_i32)((char *)t - (char *)s); } static inline TCGv_i64 temp_tcgv_i64(TCGContext *s, TCGTemp *t)