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))) {
      ~~~~~~~~~~~~~~~
master
Orestis Floros 7 years ago
parent 8ed0e9f343
commit 3f6823092a
No known key found for this signature in database
GPG Key ID: E9AD9F32E401E38F

@ -682,7 +682,7 @@ struct wlr_surface *desktop_surface_at(struct roots_desktop *desktop,
struct wlr_surface *surface = NULL; struct wlr_surface *surface = NULL;
struct wlr_output *wlr_output = struct wlr_output *wlr_output =
wlr_output_layout_output_at(desktop->layout, lx, ly); 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; double ox = lx, oy = ly;
*view = NULL; *view = NULL;

Loading…
Cancel
Save