From 3c82397d3fdbbaa8d1614a6f5eeeaad4ef20d3f6 Mon Sep 17 00:00:00 2001 From: Scott Balneaves Date: Tue, 20 Nov 2012 22:50:33 -0600 Subject: Fix deprecations and compile warnings. Clean compile --- src/core/window.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/core/window.c') diff --git a/src/core/window.c b/src/core/window.c index 06b6446f..bf1b53e4 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -53,6 +53,12 @@ #include #endif +#ifdef __GNUC__ +#define UNUSED_VARIABLE __attribute__ ((unused)) +#else +#define UNUSED_VARIABLE +#endif + static int destroying_windows_disallowed = 0; @@ -5204,7 +5210,7 @@ meta_window_client_message (MetaWindow *window, else if (event->xclient.message_type == display->atom__NET_MOVERESIZE_WINDOW) { - int gravity, source; + int gravity, UNUSED_VARIABLE source; guint value_mask; gravity = (event->xclient.data.l[0] & 0xff); @@ -5252,7 +5258,7 @@ meta_window_client_message (MetaWindow *window, else if (event->xclient.message_type == display->atom__NET_WM_FULLSCREEN_MONITORS) { - MetaClientType source_indication; + MetaClientType UNUSED_VARIABLE source_indication; gulong top, bottom, left, right; meta_verbose ("_NET_WM_FULLSCREEN_MONITORS request for window '%s'\n", @@ -5463,7 +5469,7 @@ static gboolean process_property_notify (MetaWindow *window, XPropertyEvent *event) { - Window xid = window->xwindow; + Window UNUSED_VARIABLE xid = window->xwindow; if (meta_is_verbose ()) /* avoid looking up the name if we don't have to */ { @@ -6705,7 +6711,7 @@ meta_window_titlebar_is_onscreen (MetaWindow *window) { MetaRectangle titlebar_rect; GList *onscreen_region; - int titlebar_size; + int UNUSED_VARIABLE titlebar_size; gboolean is_onscreen; const int min_height_needed = 8; -- cgit v1.2.1