summaryrefslogtreecommitdiffstats
path: root/wayland
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2015-11-18 19:59:47 -0500
committerLibravatar Drew DeVault <sir@cmpwn.com>2015-11-18 19:59:47 -0500
commitfb0bfa13ce8b5f71e4ba1570dd6d39f98a2f5fdf (patch)
tree310a8ffe1edba2b192ae568f1c6724ca00c00091 /wayland
parentExit if unable to allocate buffer (diff)
downloadsway-fb0bfa13ce8b5f71e4ba1570dd6d39f98a2f5fdf.tar.gz
sway-fb0bfa13ce8b5f71e4ba1570dd6d39f98a2f5fdf.tar.zst
sway-fb0bfa13ce8b5f71e4ba1570dd6d39f98a2f5fdf.zip
Fix warning about uninitialized variable
Diffstat (limited to 'wayland')
-rw-r--r--wayland/buffers.c1
1 files changed, 1 insertions, 0 deletions
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
59 int fd = create_pool_file(size, &name); 59 int fd = create_pool_file(size, &name);
60 if (fd == -1) { 60 if (fd == -1) {
61 sway_abort("Unable to allocate buffer"); 61 sway_abort("Unable to allocate buffer");
62 return NULL; // never reached
62 } 63 }
63 void *data = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); 64 void *data = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
64 struct wl_shm_pool *pool = wl_shm_create_pool(state->shm, fd, size); 65 struct wl_shm_pool *pool = wl_shm_create_pool(state->shm, fd, size);