aboutsummaryrefslogtreecommitdiff
path: root/swaybar/bar.c
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-04-24 18:22:44 +0100
committerGitHub <noreply@github.com>2018-04-24 18:22:44 +0100
commit4568e6c7835da29c9010ecb18ba6c430da5b2770 (patch)
tree6122c128731c16f3f8fb75cb8aed1ee682d55c9f /swaybar/bar.c
parent5024f0888581cde0a9bc6b86222c14a97890b479 (diff)
parent63267240bf34af7095a235e81cf32d1090e1dd60 (diff)
Merge pull request #1856 from Hello71/issue1855
Work around maybe-uninitialized in bar.c
Diffstat (limited to 'swaybar/bar.c')
-rw-r--r--swaybar/bar.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/swaybar/bar.c b/swaybar/bar.c
index d407db4f..b4c0698f 100644
--- a/swaybar/bar.c
+++ b/swaybar/bar.c
@@ -162,9 +162,11 @@ static void wl_pointer_axis(void *data, struct wl_pointer *wl_pointer,
return;
}
+ // last doesn't actually need initialization,
+ // but gcc (7.3.1) is too dumb to figure it out
struct swaybar_workspace *first = NULL;
struct swaybar_workspace *active = NULL;
- struct swaybar_workspace *last;
+ struct swaybar_workspace *last = NULL;
struct swaybar_workspace *iter;
wl_list_for_each(iter, &output->workspaces, link) {