[PATCH] Quell warning about potentially uninitialized variable 'surface'
Bryce Harrington
bryce at canonical.com
Fri Nov 19 12:14:55 PST 2010
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 at canonical.com>
---
clients/window.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/clients/window.c b/clients/window.c
index 66d7aad..37f6872 100644
--- a/clients/window.c
+++ b/clients/window.c
@@ -601,6 +601,9 @@ window_create_surface(struct window *window)
surface = display_create_shm_surface(window->display,
&window->allocation);
break;
+ default:
+ surface = NULL;
+ break;
}
window_set_surface(window, surface);
--
1.7.1
More information about the wayland-devel
mailing list