diff options
author | Christophe Fergeau <cfergeau@redhat.com> | 2011-04-11 11:26:31 +0200 |
---|---|---|
committer | Christophe Fergeau <cfergeau@redhat.com> | 2011-04-11 11:30:49 +0200 |
commit | 9535546e3b13c81afdb9d2bfe6f86f6ce00aee64 (patch) | |
tree | 5198a2e5abd9353ed4afbec0ac97f3d7833f6543 | |
parent | a8adff78c1027159d598590d2a6d01495ee6e7bf (diff) |
gtk: fix "set but not used" gcc 4.6 warnings
Since we are compiling with -Werror, this was breaking compilation.
-rw-r--r-- | common/canvas_base.c | 12 | ||||
-rw-r--r-- | common/sw_canvas.c | 25 | ||||
-rw-r--r-- | gtk/display/gnome-rr.c | 10 |
3 files changed, 15 insertions, 32 deletions
diff --git a/common/canvas_base.c b/common/canvas_base.c index a974d0b..54de7c6 100644 --- a/common/canvas_base.c +++ b/common/canvas_base.c @@ -656,14 +656,12 @@ static pixman_image_t *canvas_bitmap_to_surface(CanvasBase *canvas, SpiceBitmap* SpicePalette *palette, int want_original) { uint8_t* src; - int src_stride; pixman_image_t *image; pixman_format_code_t format; spice_chunks_linearize(bitmap->data); src = bitmap->data->chunk[0].data; - src_stride = bitmap->stride; if (want_original) { format = spice_bitmap_format_to_pixman(bitmap->format, canvas->format); @@ -2548,11 +2546,6 @@ static void canvas_draw_blend(SpiceCanvas *spice_canvas, SpiceRect *bbox, SpiceC bbox->top - blend->src_area.top, rop); } else { - double sx, sy; - - sx = (double)(blend->src_area.right - blend->src_area.left) / (bbox->right - bbox->left); - sy = (double)(blend->src_area.bottom - blend->src_area.top) / (bbox->bottom - bbox->top); - if (rop == SPICE_ROP_COPY) { spice_canvas->ops->scale_image_from_surface(spice_canvas, &dest_region, surface_canvas, @@ -2596,11 +2589,6 @@ static void canvas_draw_blend(SpiceCanvas *spice_canvas, SpiceRect *bbox, SpiceC bbox->top - blend->src_area.top, rop); } else { - double sx, sy; - - sx = (double)(blend->src_area.right - blend->src_area.left) / (bbox->right - bbox->left); - sy = (double)(blend->src_area.bottom - blend->src_area.top) / (bbox->bottom - bbox->top); - if (rop == SPICE_ROP_COPY) { spice_canvas->ops->scale_image(spice_canvas, &dest_region, src_image, diff --git a/common/sw_canvas.c b/common/sw_canvas.c index 71600eb..09b649f 100644 --- a/common/sw_canvas.c +++ b/common/sw_canvas.c @@ -1182,7 +1182,6 @@ static SpiceCanvas *canvas_create_common(pixman_image_t *image, ) { SwCanvas *canvas; - int init_ok; if (need_init) { return NULL; @@ -1191,21 +1190,21 @@ static SpiceCanvas *canvas_create_common(pixman_image_t *image, spice_surface_format_to_pixman (format)); canvas = spice_new0(SwCanvas, 1); - init_ok = canvas_base_init(&canvas->base, &sw_canvas_ops, - pixman_image_get_width (image), - pixman_image_get_height (image), - format + canvas_base_init(&canvas->base, &sw_canvas_ops, + pixman_image_get_width (image), + pixman_image_get_height (image), + format #ifdef SW_CANVAS_CACHE - , bits_cache - , palette_cache + , bits_cache + , palette_cache #elif defined(SW_CANVAS_IMAGE_CACHE) - , bits_cache + , bits_cache #endif - , surfaces - , glz_decoder - , jpeg_decoder - , zlib_decoder - ); + , surfaces + , glz_decoder + , jpeg_decoder + , zlib_decoder + ); canvas->private_data = NULL; canvas->private_data_size = 0; diff --git a/gtk/display/gnome-rr.c b/gtk/display/gnome-rr.c index f141e8e..86d5319 100644 --- a/gtk/display/gnome-rr.c +++ b/gtk/display/gnome-rr.c @@ -266,12 +266,9 @@ ScreenInfo * screen_info_new (GnomeRRScreen *screen, gboolean needs_reprobe, GError **error) { ScreenInfo *info = g_new0 (ScreenInfo, 1); - GnomeRRScreenPrivate *priv; g_return_val_if_fail (screen != NULL, NULL); - priv = screen->priv; - info->outputs = NULL; info->crtcs = NULL; info->modes = NULL; @@ -945,15 +942,14 @@ void gnome_rr_screen_set_primary_output (GnomeRRScreen *screen, GnomeRROutput *output) { - GnomeRRScreenPrivate *priv; - g_return_if_fail (GNOME_IS_RR_SCREEN (screen)); - priv = screen->priv; - #if RANDR_LIBRARY_IS_AT_LEAST_1_3 + GnomeRRScreenPrivate *priv; RROutput id; + priv = screen->priv; + if (output) id = output->id; else |