mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-11-04 13:29:51 -05:00
Quell warning about potentially uninitialized variable 'surface'
In theory, it was possible for an undefined 'surface' to be passed to window_set_surface(). Instead, explicitly pass NULL. Signed-off-by: Bryce Harrington <bryce@canonical.com>
This commit is contained in:
parent
f57303f7cf
commit
515f63ad72
1 changed files with 3 additions and 0 deletions
|
|
@ -600,6 +600,9 @@ window_create_surface(struct window *window)
|
||||||
surface = display_create_shm_surface(window->display,
|
surface = display_create_shm_surface(window->display,
|
||||||
&window->allocation);
|
&window->allocation);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
surface = NULL;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
window_set_surface(window, surface);
|
window_set_surface(window, surface);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue