From 7246c4cc470409bc77ae607463d1fcd026149d6a Mon Sep 17 00:00:00 2001 From: Roman Kiryanov Date: Thu, 20 Jun 2024 13:16:54 -0700 Subject: [PATCH] exec: don't use void* in pointer arithmetic in headers void* pointer arithmetic is a GCC extentension which could not be available in other build tools (e.g. C++). This changes removes this assumption. Signed-off-by: Roman Kiryanov Suggested-by: Paolo Bonzini Link: https://lore.kernel.org/r/20240620201654.598024-1-rkir@google.com Signed-off-by: Paolo Bonzini --- include/exec/memory.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/exec/memory.h b/include/exec/memory.h index 154626f9ad..c26ede33d2 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -2764,7 +2764,7 @@ MemTxResult address_space_write_rom(AddressSpace *as, hwaddr addr, #include "exec/memory_ldst_phys.h.inc" struct MemoryRegionCache { - void *ptr; + uint8_t *ptr; hwaddr xlat; hwaddr len; FlatView *fv;