mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice-gtk
synced 2025-12-31 19:45:45 +00:00
gtk: fix "set but not used" gcc 4.6 warnings
Since we are compiling with -Werror, this was breaking compilation.
This commit is contained in:
parent
a8adff78c1
commit
9535546e3b
@ -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,
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user