mirror of https://github.com/xemu-project/xemu.git
contrib/vhost-user-gpu: Fix compiler warning when compiling with -Wshadow
Rename some variables to avoid compiler warnings when compiling with -Wshadow=local. Signed-off-by: Thomas Huth <thuth@redhat.com> Message-ID: <20231009083726.30301-1-thuth@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
parent
9e7d33941f
commit
cc46a7ef3b
|
@ -834,7 +834,7 @@ vg_resource_flush(VuGpu *g,
|
||||||
.width = width,
|
.width = width,
|
||||||
.height = height,
|
.height = height,
|
||||||
};
|
};
|
||||||
pixman_image_t *i =
|
pixman_image_t *img =
|
||||||
pixman_image_create_bits(pixman_image_get_format(res->image),
|
pixman_image_create_bits(pixman_image_get_format(res->image),
|
||||||
msg->payload.update.width,
|
msg->payload.update.width,
|
||||||
msg->payload.update.height,
|
msg->payload.update.height,
|
||||||
|
@ -842,11 +842,11 @@ vg_resource_flush(VuGpu *g,
|
||||||
payload.update.data),
|
payload.update.data),
|
||||||
width * bpp);
|
width * bpp);
|
||||||
pixman_image_composite(PIXMAN_OP_SRC,
|
pixman_image_composite(PIXMAN_OP_SRC,
|
||||||
res->image, NULL, i,
|
res->image, NULL, img,
|
||||||
extents->x1, extents->y1,
|
extents->x1, extents->y1,
|
||||||
0, 0, 0, 0,
|
0, 0, 0, 0,
|
||||||
width, height);
|
width, height);
|
||||||
pixman_image_unref(i);
|
pixman_image_unref(img);
|
||||||
vg_send_msg(g, msg, -1);
|
vg_send_msg(g, msg, -1);
|
||||||
g_free(msg);
|
g_free(msg);
|
||||||
}
|
}
|
||||||
|
|
|
@ -164,12 +164,12 @@ struct virtio_gpu_ctrl_command {
|
||||||
};
|
};
|
||||||
|
|
||||||
#define VUGPU_FILL_CMD(out) do { \
|
#define VUGPU_FILL_CMD(out) do { \
|
||||||
size_t s; \
|
size_t vugpufillcmd_s_ = \
|
||||||
s = iov_to_buf(cmd->elem.out_sg, cmd->elem.out_num, 0, \
|
iov_to_buf(cmd->elem.out_sg, cmd->elem.out_num, 0, \
|
||||||
&out, sizeof(out)); \
|
&out, sizeof(out)); \
|
||||||
if (s != sizeof(out)) { \
|
if (vugpufillcmd_s_ != sizeof(out)) { \
|
||||||
g_critical("%s: command size incorrect %zu vs %zu", \
|
g_critical("%s: command size incorrect %zu vs %zu", \
|
||||||
__func__, s, sizeof(out)); \
|
__func__, vugpufillcmd_s_, sizeof(out)); \
|
||||||
return; \
|
return; \
|
||||||
} \
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
Loading…
Reference in New Issue