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. --- swaybar/tray/item.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'swaybar') diff --git a/swaybar/tray/item.c b/swaybar/tray/item.c index 39d83b23..a43bbf6f 100644 --- a/swaybar/tray/item.c +++ b/swaybar/tray/item.c @@ -334,7 +334,7 @@ static void handle_click(struct swaybar_sni *sni, int x, int y, if (strncmp(method, "Scroll", strlen("Scroll")) == 0) { char dir = method[strlen("Scroll")]; - char *orientation = (dir = 'U' || dir == 'D') ? "vertical" : "horizontal"; + char *orientation = (dir == 'U' || dir == 'D') ? "vertical" : "horizontal"; int sign = (dir == 'U' || dir == 'L') ? -1 : 1; sd_bus_call_method_async(sni->tray->bus, NULL, sni->service, sni->path, -- cgit v1.2.3-54-g00ecf