From e872964e6a147ef0e1f5a14913127660b6627a5e Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Thu, 30 Apr 2020 23:30:22 -0700 Subject: Remove usage of GCC pointer arithmetic on void * extension --- backend.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'backend.c') diff --git a/backend.c b/backend.c index 4629c16..595e9da 100644 --- a/backend.c +++ b/backend.c @@ -83,7 +83,7 @@ void * get_native_pointer(uint32_t address, void ** mem_pointers, cpu_options * : memmap[chunk].buffer; if (!base) { if (memmap[chunk].flags & MMAP_AUX_BUFF) { - return memmap[chunk].buffer + (address & memmap[chunk].aux_mask); + return ((uint8_t *)memmap[chunk].buffer) + (address & memmap[chunk].aux_mask); } return NULL; } @@ -108,7 +108,7 @@ void * get_native_write_pointer(uint32_t address, void ** mem_pointers, cpu_opti : memmap[chunk].buffer; if (!base) { if (memmap[chunk].flags & MMAP_AUX_BUFF) { - return memmap[chunk].buffer + (address & memmap[chunk].aux_mask); + return ((uint8_t *)memmap[chunk].buffer) + (address & memmap[chunk].aux_mask); } return NULL; } -- cgit v1.2.3