From 0af5b26e41c5141d4094652133c230d76bf82e56 Mon Sep 17 00:00:00 2001 From: M Stoeckl Date: Tue, 22 Jan 2019 10:07:38 -0500 Subject: Fix dead stores found by scan-build In addition to removing unused code, two minor problems are fixed: (1) `resize set` and `resize adjust` did not error when given too many arguments. (2) `orientation` was incorrectly overridden to be 'U' for scroll events in the swaybar tray `handle_click` function. --- sway/tree/view.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sway/tree/view.c') diff --git a/sway/tree/view.c b/sway/tree/view.c index edbfca97..8795e04f 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c @@ -236,8 +236,6 @@ void view_autoconfigure(struct sway_view *view) { con->border_bottom = bottom_y != ws->y + ws->height; } - double x, y, width, height; - x = y = width = height = 0; double y_offset = 0; // In a tabbed or stacked container, the container's y is the top of the @@ -253,7 +251,9 @@ void view_autoconfigure(struct sway_view *view) { con->border_top = false; } + double x, y, width, height; switch (con->border) { + default: case B_CSD: case B_NONE: x = con->x; -- cgit v1.2.3-54-g00ecf