[mutter/wayland] display: Tweak code to work around a compiler warning
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wayland] display: Tweak code to work around a compiler warning
- Date: Tue, 19 Nov 2013 19:09:33 +0000 (UTC)
commit 17f48baf3a08b96cb1cb9a4147aa41ee2e0f73cc
Author: Florian Müllner <fmuellner gnome org>
Date: Tue Nov 19 19:44:30 2013 +0100
display: Tweak code to work around a compiler warning
The compiler is not quite smart enough to figure out that the condition
for setting the "compositor" variable matches a later condition for
accessing it, so express this in a way the compiler will understand.
src/core/display.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/core/display.c b/src/core/display.c
index 8e90af0..2a6779d 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -2042,7 +2042,7 @@ meta_display_handle_event (MetaDisplay *display,
/* XXX -- we need to fill this in properly at some point... */
gboolean frame_was_receiver = FALSE;
#ifdef HAVE_WAYLAND
- MetaWaylandCompositor *compositor;
+ MetaWaylandCompositor *compositor = NULL;
if (meta_is_wayland_compositor ())
{
@@ -2293,7 +2293,7 @@ meta_display_handle_event (MetaDisplay *display,
}
#ifdef HAVE_WAYLAND
- if (meta_is_wayland_compositor () && (display->grab_op == META_GRAB_OP_NONE))
+ if (compositor && (display->grab_op == META_GRAB_OP_NONE))
{
if (meta_wayland_compositor_handle_event (compositor, event))
return TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]