wayland: assert that mmap() didn't return NULL.
authorRyan C. Gordon
Thu, 28 May 2020 14:47:55 -0400
changeset 13867cf1e807e68e2
parent 13866 edd91a51feb6
child 13868 25b93f5a6cbf
wayland: assert that mmap() didn't return NULL.

In practice, it never _would_, but in theory it _might_, so this assertion
tells the static analyzer not to worry about it.
src/video/wayland/SDL_waylandmouse.c
     1.1 --- a/src/video/wayland/SDL_waylandmouse.c	Wed May 27 10:35:43 2020 -0700
     1.2 +++ b/src/video/wayland/SDL_waylandmouse.c	Thu May 28 14:47:55 2020 -0400
     1.3 @@ -125,6 +125,8 @@
     1.4          return SDL_SetError("mmap() failed.");
     1.5      }
     1.6  
     1.7 +    SDL_assert(d->shm_data != NULL);
     1.8 +
     1.9      shm_pool = wl_shm_create_pool(data->shm, shm_fd, size);
    1.10      d->buffer = wl_shm_pool_create_buffer(shm_pool,
    1.11                                            0,