summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
8f3fa1e)
Avoid doing arithmetic on pointers to keep compilers happy.
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
if (!DISABLE_MEM_LUTS) {
void *ptr = lut[mem >> 16];
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);