exec: don't use void* in pointer arithmetic in headers
authorRoman Kiryanov <rkir@google.com>
Thu, 20 Jun 2024 20:16:54 +0000 (13:16 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 28 Jun 2024 12:44:51 +0000 (14:44 +0200)
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 <rkir@google.com>
Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Link: https://lore.kernel.org/r/20240620201654.598024-1-rkir@google.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
include/exec/memory.h

index 154626f9ad2ce75515458e797e5b471b248c7d3d..c26ede33d21e82beba7de82892b23dd96ab9ae70 100644 (file)
@@ -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;