diff options
author | Orestis Floros <orestisf1993@gmail.com> | 2018-03-31 12:55:36 +0300 |
---|---|---|
committer | Orestis Floros <orestisf1993@gmail.com> | 2018-03-31 12:57:12 +0300 |
commit | 3f6823092ad9bfa1def3c33e5d3c2d3cdbc676fa (patch) | |
tree | 3feeabe1b51df3550c6c8742169c08a15163cf62 /rootston/desktop.c | |
parent | 8ed0e9f34341c77a9be6c0ab98ed18f83dca2c0d (diff) |
Initialize roots_output to fix -Wmaybe-uninitialized
With -O2:
../rootston/desktop.c: In function ‘desktop_surface_at’:
../rootston/desktop.c:714:18: error: ‘roots_output’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
if ((surface = layer_surface_at(roots_output,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
&roots_output->layers[ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM],
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ox, oy, sx, sy))) {
~~~~~~~~~~~~~~~
Diffstat (limited to 'rootston/desktop.c')
-rw-r--r-- | rootston/desktop.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rootston/desktop.c b/rootston/desktop.c index 0668d8cb..c2e424cf 100644 --- a/rootston/desktop.c +++ b/rootston/desktop.c @@ -682,7 +682,7 @@ struct wlr_surface *desktop_surface_at(struct roots_desktop *desktop, struct wlr_surface *surface = NULL; struct wlr_output *wlr_output = wlr_output_layout_output_at(desktop->layout, lx, ly); - struct roots_output *roots_output; + struct roots_output *roots_output = NULL; double ox = lx, oy = ly; *view = NULL; |