Silence new gcc warnings

gcc 4.6.0 has started to warn about set-but-unused variables.
So don't do that, then.
This commit is contained in:
Matthias Clasen
2011-01-23 18:50:09 -05:00
parent a12dad75a2
commit 454c36523a
8 changed files with 47 additions and 96 deletions

View File

@ -429,7 +429,7 @@ update_cursor (gpointer data,
if (!cursor)
return;
_gdk_x11_cursor_update_theme (cursor);
}
@ -437,18 +437,18 @@ update_cursor (gpointer data,
* gdk_x11_display_set_cursor_theme:
* @display: a #GdkDisplay
* @theme: the name of the cursor theme to use, or %NULL to unset
* a previously set value
* a previously set value
* @size: the cursor size to use, or 0 to keep the previous size
*
* Sets the cursor theme from which the images for cursor
* should be taken.
*
* If the windowing system supports it, existing cursors created
* with gdk_cursor_new(), gdk_cursor_new_for_display() and
* gdk_cursor_new_for_name() are updated to reflect the theme
* should be taken.
*
* If the windowing system supports it, existing cursors created
* with gdk_cursor_new(), gdk_cursor_new_for_display() and
* gdk_cursor_new_for_name() are updated to reflect the theme
* change. Custom cursors constructed with
* gdk_cursor_new_from_pixbuf() will have to be handled
* by the application (GTK+ applications can learn about
* by the application (GTK+ applications can learn about
* cursor theme changes by listening for change notification
* for the corresponding #GtkSetting).
*
@ -459,14 +459,12 @@ gdk_x11_display_set_cursor_theme (GdkDisplay *display,
const gchar *theme,
const gint size)
{
GdkX11Display *display_x11;
Display *xdisplay;
gchar *old_theme;
gint old_size;
g_return_if_fail (GDK_IS_DISPLAY (display));
display_x11 = GDK_X11_DISPLAY (display);
xdisplay = GDK_DISPLAY_XDISPLAY (display);
old_theme = XcursorGetTheme (xdisplay);
@ -482,13 +480,13 @@ gdk_x11_display_set_cursor_theme (GdkDisplay *display,
XcursorSetTheme (xdisplay, theme);
if (size > 0)
XcursorSetDefaultSize (xdisplay, size);
g_slist_foreach (cursor_cache, update_cursor, NULL);
}
#else
static GdkPixbuf*
static GdkPixbuf*
gdk_x11_cursor_get_image (GdkCursor *cursor)
{
return NULL;

View File

@ -497,13 +497,11 @@ gdk_x11_device_xi_select_window_events (GdkDevice *device,
GdkEventMask event_mask)
{
XEventClass event_classes[MAX_DEVICE_CLASSES];
GdkX11DeviceXI *device_xi;
gint num_classes;
event_mask |= (GDK_PROXIMITY_IN_MASK |
GDK_PROXIMITY_OUT_MASK);
device_xi = GDK_X11_DEVICE_XI (device);
find_events (device, event_mask, event_classes, &num_classes);
XSelectExtensionEvent (GDK_WINDOW_XDISPLAY (window),
@ -590,14 +588,12 @@ _gdk_x11_device_xi_translate_axes (GdkDevice *device,
gdouble *x,
gdouble *y)
{
GdkX11DeviceXI *device_xi;
GdkWindow *impl_window;
gdouble root_x, root_y;
gdouble temp_x, temp_y;
gint n_axes;
gint i;
device_xi = GDK_X11_DEVICE_XI (device);
impl_window = _gdk_window_get_impl_window (window);
temp_x = temp_y = 0;

View File

@ -415,7 +415,6 @@ gdk_x11_device_manager_core_translate_event (GdkEventTranslator *translator,
{
GdkX11DeviceManagerCore *device_manager;
GdkWindow *window;
GdkWindowImplX11 *window_impl = NULL;
gboolean return_val;
GdkToplevelX11 *toplevel = NULL;
GdkX11Display *display_x11 = GDK_X11_DISPLAY (display);
@ -431,7 +430,6 @@ gdk_x11_device_manager_core_translate_event (GdkEventTranslator *translator,
return FALSE;
toplevel = _gdk_x11_window_get_toplevel (window);
window_impl = GDK_WINDOW_IMPL_X11 (window->impl);
g_object_ref (window);
}

View File

@ -411,10 +411,8 @@ gdk_x11_device_manager_xi2_constructed (GObject *object)
/* Initialize devices list */
for (i = 0; i < ndevices; i++)
{
GdkDevice *device;
dev = &info[i];
device = add_device (device_manager, dev, FALSE);
add_device (device_manager, dev, FALSE);
if (dev->use == XIMasterPointer ||
dev->use == XIMasterKeyboard)
@ -567,7 +565,6 @@ handle_hierarchy_changed (GdkX11DeviceManagerXI2 *device_manager,
{
GdkDisplay *display;
Display *xdisplay;
GdkDevice *device;
XIDeviceInfo *info;
int ndevices;
gint i;
@ -580,7 +577,7 @@ handle_hierarchy_changed (GdkX11DeviceManagerXI2 *device_manager,
if (ev->info[i].flags & XIDeviceEnabled)
{
info = XIQueryDevice (xdisplay, ev->info[i].deviceid, &ndevices);
device = add_device (device_manager, &info[0], TRUE);
add_device (device_manager, &info[0], TRUE);
XIFreeDeviceInfo (info);
}
else if (ev->info[i].flags & XIDeviceDisabled)
@ -870,18 +867,14 @@ translate_axes (GdkDevice *device,
XIValuatorState *valuators)
{
guint n_axes, i;
gint width, height;
gdouble *axes;
double *vals;
gdouble *vals;
g_object_get (device, "n-axes", &n_axes, NULL);
axes = g_new0 (gdouble, n_axes);
vals = valuators->values;
width = gdk_window_get_width (window);
height = gdk_window_get_height (window);
for (i = 0; i < valuators->mask_len * 8; i++)
{
GdkAxisUse use;

View File

@ -272,7 +272,6 @@ _gdk_x11_window_translate (GdkWindow *window,
GC xgc;
GdkRectangle extents;
GdkWindow *parent;
int px, py;
/* We need to get data from subwindows here, because we might have
* shaped a native window over the moving region (with bg none,
@ -281,7 +280,6 @@ _gdk_x11_window_translate (GdkWindow *window,
* so we copy from the toplevel with INCLUDE_INFERIORS.
*/
parent = window;
px = py = 0;
while (parent->parent != NULL &&
parent->parent->window_type != GDK_WINDOW_ROOT)
{