From fb0bfa13ce8b5f71e4ba1570dd6d39f98a2f5fdf Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Wed, 18 Nov 2015 19:59:47 -0500 Subject: [PATCH] Fix warning about uninitialized variable --- wayland/buffers.c | 1 + 1 file changed, 1 insertion(+) diff --git a/wayland/buffers.c b/wayland/buffers.c index 7cbf926f..dfedfcf7 100644 --- a/wayland/buffers.c +++ b/wayland/buffers.c @@ -59,6 +59,7 @@ static struct buffer *create_buffer(struct client_state *state, struct buffer *b int fd = create_pool_file(size, &name); if (fd == -1) { sway_abort("Unable to allocate buffer"); + return NULL; // never reached } void *data = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); struct wl_shm_pool *pool = wl_shm_create_pool(state->shm, fd, size);