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 --- render_sdl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'render_sdl.c') diff --git a/render_sdl.c b/render_sdl.c index 5526dd7..1077109 100755 --- a/render_sdl.c +++ b/render_sdl.c @@ -1361,14 +1361,14 @@ uint32_t *render_get_framebuffer(uint8_t which, int *pitch) warning("Request for invalid framebuffer number %d\n", which); return NULL; } - void *pixels; - if (SDL_LockTexture(sdl_textures[which], NULL, &pixels, pitch) < 0) { + uint8_t *pixels; + if (SDL_LockTexture(sdl_textures[which], NULL, (void **)&pixels, pitch) < 0) { warning("Failed to lock texture: %s\n", SDL_GetError()); return NULL; } static uint8_t last; if (which <= FRAMEBUFFER_EVEN) { - locked_pixels = pixels; + locked_pixels = (uint32_t *)pixels; if (which == FRAMEBUFFER_EVEN) { pixels += *pitch; } @@ -1378,7 +1378,7 @@ uint32_t *render_get_framebuffer(uint8_t which, int *pitch) } last = which; } - return pixels; + return (uint32_t *)pixels; #ifndef DISABLE_OPENGL } #endif -- cgit v1.2.3