diff options
author | Alex Xu (Hello71) <alex_y_xu@yahoo.ca> | 2018-04-24 12:06:13 -0400 |
---|---|---|
committer | Alex Xu (Hello71) <alex_y_xu@yahoo.ca> | 2018-04-24 12:29:11 -0400 |
commit | 63267240bf34af7095a235e81cf32d1090e1dd60 (patch) | |
tree | 6122c128731c16f3f8fb75cb8aed1ee682d55c9f /swaybar | |
parent | Merge pull request #1848 from snaggen/improved_key_handling (diff) | |
download | sway-63267240bf34af7095a235e81cf32d1090e1dd60.tar.gz sway-63267240bf34af7095a235e81cf32d1090e1dd60.tar.zst sway-63267240bf34af7095a235e81cf32d1090e1dd60.zip |
Work around maybe-uninitialized in bar.c
Fixes #1855.
Diffstat (limited to 'swaybar')
-rw-r--r-- | swaybar/bar.c | 4 |
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, | |||
162 | return; | 162 | return; |
163 | } | 163 | } |
164 | 164 | ||
165 | // last doesn't actually need initialization, | ||
166 | // but gcc (7.3.1) is too dumb to figure it out | ||
165 | struct swaybar_workspace *first = NULL; | 167 | struct swaybar_workspace *first = NULL; |
166 | struct swaybar_workspace *active = NULL; | 168 | struct swaybar_workspace *active = NULL; |
167 | struct swaybar_workspace *last; | 169 | struct swaybar_workspace *last = NULL; |
168 | 170 | ||
169 | struct swaybar_workspace *iter; | 171 | struct swaybar_workspace *iter; |
170 | wl_list_for_each(iter, &output->workspaces, link) { | 172 | wl_list_for_each(iter, &output->workspaces, link) { |