notaz.gp2x.de
/
pcsx_rearmed.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c9f729d
)
psxmem.h: Fix annoying warning
author
Paul Cercueil
<paul@crapouillou.net>
Sun, 22 Oct 2023 22:38:45 +0000
(
00:38
+0200)
committer
notaz
<notasas@gmail.com>
Mon, 23 Oct 2023 22:34:30 +0000
(
01:34
+0300)
Avoid doing arithmetic on pointers to keep compilers happy.
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
libpcsxcore/psxmem.h
patch
|
blob
|
blame
|
history
diff --git
a/libpcsxcore/psxmem.h
b/libpcsxcore/psxmem.h
index
f3c2051
..
4e95c4d
100644
(file)
--- 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)