Fix warnings when building without verbose mode

This commit is contained in:
Jonas Ådahl 2018-07-12 17:08:52 +02:00
parent bc32655c28
commit a97cc84b81
3 changed files with 12 additions and 0 deletions

View File

@ -185,7 +185,9 @@ meta_stack_op_dump (MetaStackTracker *tracker,
const char *prefix,
const char *suffix)
{
#ifdef WITH_VERBOSE_MODE
const char *window_desc = get_window_desc (tracker, op->any.window);
#endif
switch (op->any.type)
{
@ -220,6 +222,7 @@ meta_stack_op_dump (MetaStackTracker *tracker,
}
}
#ifdef WITH_VERBOSE_MODE
static void
stack_dump (MetaStackTracker *tracker,
GArray *stack)
@ -235,10 +238,12 @@ stack_dump (MetaStackTracker *tracker,
meta_topic (META_DEBUG_STACK, "\n");
meta_pop_no_msg_prefix ();
}
#endif /* WITH_VERBOSE_MODE */
static void
meta_stack_tracker_dump (MetaStackTracker *tracker)
{
#ifdef WITH_VERBOSE_MODE
GList *l;
meta_topic (META_DEBUG_STACK, "MetaStackTracker state\n");
@ -259,6 +264,7 @@ meta_stack_tracker_dump (MetaStackTracker *tracker)
stack_dump (tracker, tracker->predicted_stack);
}
meta_pop_no_msg_prefix ();
#endif /* WITH_VERBOSE_MODE */
}
static void

View File

@ -778,7 +778,9 @@ gboolean
meta_wayland_keyboard_handle_event (MetaWaylandKeyboard *keyboard,
const ClutterKeyEvent *event)
{
#ifdef WITH_VERBOSE_MODE
gboolean is_press = event->type == CLUTTER_KEY_PRESS;
#endif
gboolean handled;
/* Synthetic key events are for autorepeat. Ignore those, as

View File

@ -254,7 +254,9 @@ bind_output (struct wl_client *client,
MetaWaylandOutput *wayland_output = data;
MetaLogicalMonitor *logical_monitor = wayland_output->logical_monitor;
struct wl_resource *resource;
#ifdef WITH_VERBOSE_MODE
MetaMonitor *monitor;
#endif
resource = wl_resource_create (client, &wl_output_interface, version, id);
wayland_output->resources = g_list_prepend (wayland_output->resources, resource);
@ -265,6 +267,7 @@ bind_output (struct wl_client *client,
if (!logical_monitor)
return;
#ifdef WITH_VERBOSE_MODE
monitor = pick_main_monitor (logical_monitor);
meta_verbose ("Binding monitor %p/%s (%u, %u, %u, %u) x %f\n",
@ -273,6 +276,7 @@ bind_output (struct wl_client *client,
logical_monitor->rect.x, logical_monitor->rect.y,
logical_monitor->rect.width, logical_monitor->rect.height,
wayland_output->refresh_rate);
#endif
send_output_events (resource, wayland_output, logical_monitor, TRUE, NULL);
}