From 5caa76c5dfa45659d0e3d04f5f8245471e894d78 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 30 Jan 2011 01:50:58 -0500 Subject: [PATCH] Fix compiler warnings about unused variables --- gtk/gtkwidget.c | 36 ++++++++++++++---------------------- 1 file changed, 14 insertions(+), 22 deletions(-) diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index 567c88fbc6..d440b2fa03 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -10835,25 +10835,23 @@ _gtk_widget_peek_request_cache (GtkWidget *widget) /* * _gtk_widget_set_device_window: - * @widget: a #GtkWidget. - * @device: a #GdkDevice. - * @window: the new device window. + * @widget: a #GtkWidget + * @device: a #GdkDevice + * @window: the new device window * - * Sets pointer window for @widget and @device. Does not ref @window. + * Sets pointer window for @widget and @device. + * Does not ref @window. */ void _gtk_widget_set_device_window (GtkWidget *widget, GdkDevice *device, GdkWindow *window) { - GtkWidgetPrivate *priv; GHashTable *device_window; g_return_if_fail (GTK_IS_WIDGET (widget)); g_return_if_fail (GDK_IS_DEVICE (device)); - g_return_if_fail (!window || GDK_IS_WINDOW (window)); - - priv = widget->priv; + g_return_if_fail (window == NULL || GDK_IS_WINDOW (window)); if (!gtk_widget_get_mapped (widget)) return; @@ -10882,24 +10880,20 @@ _gtk_widget_set_device_window (GtkWidget *widget, /* * _gtk_widget_get_device_window: - * @widget: a #GtkWidget. - * @device: a #GdkDevice. + * @widget: a #GtkWidget + * @device: a #GdkDevice * - * Return value: the device window set on the #GdkScreen @widget is attached - * to, or %NULL. + * Return value: the device window set on @widget, or %NULL */ GdkWindow * _gtk_widget_get_device_window (GtkWidget *widget, GdkDevice *device) { - GtkWidgetPrivate *priv; GHashTable *device_window; g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL); g_return_val_if_fail (GDK_IS_DEVICE (device), NULL); - priv = widget->priv; - if (!gtk_widget_get_mapped (widget)) return NULL; @@ -10913,16 +10907,16 @@ _gtk_widget_get_device_window (GtkWidget *widget, /* * _gtk_widget_list_devices: - * @widget: a #GtkWidget. + * @widget: a #GtkWidget * - * Returns the list of #GdkDevices that is currently on top of any widget #GdkWindow. - * Free the list with g_list_free(), the elements are owned by GTK+ and must not - * be freed. + * Returns the list of #GdkDevices that is currently on top + * of any window belonging to @widget. + * Free the list with g_list_free(), the elements are owned + * by GTK+ and must not be freed. */ GList * _gtk_widget_list_devices (GtkWidget *widget) { - GtkWidgetPrivate *priv; GHashTableIter iter; GHashTable *device_window; GList *devices = NULL; @@ -10930,8 +10924,6 @@ _gtk_widget_list_devices (GtkWidget *widget) g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL); - priv = widget->priv; - if (!gtk_widget_get_mapped (widget)) return NULL;