mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-14 06:59:43 -05:00
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))) {
~~~~~~~~~~~~~~~
This commit is contained in:
parent
8ed0e9f343
commit
3f6823092a
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue