[Spice-devel] [PATCH vdagent 1/2] vdagent-x11-randr: Fix building warning
Dunrong Huang
riegamaths at gmail.com
Wed Dec 5 00:01:58 PST 2012
This patch can be safely applied since it just deletes unused variables.
Signed-off-by: Dunrong Huang <riegamaths at gmail.com>
---
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);
goto update;
}
}
--
1.8.0
More information about the Spice-devel
mailing list