mirror of
https://github.com/swaywm/sway.git
synced 2024-12-27 15:36:29 +01:00
Fix warning about uninitialized variable
This commit is contained in:
parent
2f01a3265d
commit
fb0bfa13ce
1 changed files with 1 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue