From: Paul Cercueil Date: Sun, 22 Oct 2023 22:38:45 +0000 (+0200) Subject: psxmem.h: Fix annoying warning X-Git-Tag: r24l~107^2~1 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9ea04836726b2bfb8d729b717ebefcffe2f036b6;p=pcsx_rearmed.git psxmem.h: Fix annoying warning Avoid doing arithmetic on pointers to keep compilers happy. Signed-off-by: Paul Cercueil --- diff --git a/libpcsxcore/psxmem.h b/libpcsxcore/psxmem.h index f3c2051b..4e95c4dd 100644 --- a/libpcsxcore/psxmem.h +++ b/libpcsxcore/psxmem.h @@ -125,7 +125,8 @@ static inline void * psxm_lut(u32 mem, int write, u8 **lut) if (!DISABLE_MEM_LUTS) { void *ptr = lut[mem >> 16]; - return ptr == INVALID_PTR ? INVALID_PTR : ptr + (u16)mem; + return ptr == INVALID_PTR ? INVALID_PTR + : (void *)((uintptr_t)ptr + (u16)mem); } if (mem >= 0xa0000000)