Hey, On Wed, Dec 05, 2012 at 04:01:58PM +0800, Dunrong Huang wrote: > This patch can be safely applied since it just deletes unused variables. > > Signed-off-by: Dunrong Huang <riegamaths@xxxxxxxxx> > --- > src/vdagent-x11-randr.c | 8 +------- > 1 file changed, 1 insertion(+), 7 deletions(-) > > diff --git a/src/vdagent-x11-randr.c b/src/vdagent-x11-randr.c > index 2c1819a..e171e7a 100644 > --- a/src/vdagent-x11-randr.c > +++ b/src/vdagent-x11-randr.c > @@ -204,9 +204,6 @@ static void delete_mode(struct vdagent_x11 *x11, int output_index, const char* n > int m; > XRRModeInfo *mode; > XRROutputInfo *output_info; > - XRRCrtcInfo *crtc_info; > - RRCrtc crtc; > - int current_mode = -1; > > output_info = x11->randr.outputs[output_index]; > if (output_info->ncrtc != 1) { > @@ -214,9 +211,6 @@ static void delete_mode(struct vdagent_x11 *x11, int output_index, const char* n > "failed to delete mode", output_info->ncrtc); > return; > } > - crtc_info = crtc_from_id(x11, output_info->crtcs[0]); > - current_mode = crtc_info->mode; > - crtc = output_info->crtc; > for (m = 0 ; m < x11->randr.res->nmode; ++m) { > mode = &x11->randr.res->modes[m]; > if (strcmp(mode->name, name) == 0) > @@ -689,7 +683,7 @@ void vdagent_x11_set_monitor_config(struct vdagent_x11 *x11, > if (!xrandr_add_and_set(x11, i, x, y, width, height) && > mon_config->num_of_monitors == 1) { > set_screen_to_best_size(x11, width, height, > - &primary_w, &primary_h); > + (int *)&primary_w, (int *)&primary_h); I'm not a big fan of this change as this will cause issues if sizeof(int) != sizeof(uint32_t). However, in the first half of vdagent_x11_set_monitor_config, primary_w is used with unsigned variables while in the second half, it's used with signed variables, so I'm not sure what is the best way to solve this here. I assume you were getting a warning before this cast? Christophe
Attachment:
pgpkS4YsxJ1A4.pgp
Description: PGP signature
_______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel