[mutter/wayland] Fix the build with -Werror=maybe-uninitialized
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wayland] Fix the build with -Werror=maybe-uninitialized
- Date: Thu, 27 Mar 2014 18:59:07 +0000 (UTC)
commit f4f529385ab0c397caa7816435c3e203acb3686e
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Mar 27 14:58:20 2014 -0400
Fix the build with -Werror=maybe-uninitialized
gcc can't really know that the condition won't change between
the first if and the second, so help it out by initializing
the variable up top.
src/compositor/compositor.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/compositor/compositor.c b/src/compositor/compositor.c
index 54fcd44..075d4ac 100644
--- a/src/compositor/compositor.c
+++ b/src/compositor/compositor.c
@@ -517,7 +517,7 @@ meta_compositor_manage (MetaCompositor *compositor)
MetaDisplay *display = compositor->display;
Display *xdisplay = display->xdisplay;
MetaScreen *screen = display->screen;
- Window xwin;
+ Window xwin = 0;
gint width, height;
MetaWaylandCompositor *wayland_compositor;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]