diff options
author | emersion <contact@emersion.fr> | 2018-04-15 07:42:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-15 07:42:38 +0200 |
commit | 3ea2a9a85e7db6e9858ccf68a67b312cd6db36c5 (patch) | |
tree | 9d81001776f4e095de76a63d540ab1ab0ca45caf /sway/tree/layout.c | |
parent | dcecfe6a996c89988f7639493395ebe224f8d9a8 (diff) | |
parent | 0feb25e0283657087dd73a06c1b5ae891e0896b3 (diff) |
Merge pull request #1811 from martinetd/gcc_warnings
Fix gcc warnings
Diffstat (limited to 'sway/tree/layout.c')
-rw-r--r-- | sway/tree/layout.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sway/tree/layout.c b/sway/tree/layout.c index ae76ca26..0b637822 100644 --- a/sway/tree/layout.c +++ b/sway/tree/layout.c @@ -288,8 +288,11 @@ void container_move(struct sway_container *container, switch (current->type) { case C_OUTPUT: { - enum wlr_direction wlr_dir; - sway_dir_to_wlr(move_dir, &wlr_dir); + enum wlr_direction wlr_dir = 0; + if (!sway_assert(sway_dir_to_wlr(move_dir, &wlr_dir), + "got invalid direction: %d", move_dir)) { + return; + } double ref_lx = current->x + current->width / 2; double ref_ly = current->y + current->height / 2; struct wlr_output *next = wlr_output_layout_adjacent_output( |