* [Qemu-devel] [PATCH] ui/spice-display.c: Fix compilation warnings on 32 bit hosts
@ 2012-03-07 13:36 Peter Maydell
2012-03-07 13:46 ` Alon Levy
0 siblings, 1 reply; 2+ messages in thread
From: Peter Maydell @ 2012-03-07 13:36 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann
Fix compilation failures ("cast from pointer to integer of
different size [-Werror=pointer-to-int-cast]") by using
uintptr_t instead.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
NB: compile tested only but should be safe :-)
ui/spice-display.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/ui/spice-display.c b/ui/spice-display.c
index ab266ae..35499e2 100644
--- a/ui/spice-display.c
+++ b/ui/spice-display.c
@@ -75,8 +75,8 @@ void qemu_spice_add_memslot(SimpleSpiceDisplay *ssd, QXLDevMemSlot *memslot,
{
if (async != QXL_SYNC) {
spice_qxl_add_memslot_async(&ssd->qxl, memslot,
- (uint64_t)qxl_cookie_new(QXL_COOKIE_TYPE_IO,
- QXL_IO_MEMSLOT_ADD_ASYNC));
+ (uintptr_t)qxl_cookie_new(QXL_COOKIE_TYPE_IO,
+ QXL_IO_MEMSLOT_ADD_ASYNC));
} else {
ssd->worker->add_memslot(ssd->worker, memslot);
}
@@ -93,8 +93,8 @@ void qemu_spice_create_primary_surface(SimpleSpiceDisplay *ssd, uint32_t id,
{
if (async != QXL_SYNC) {
spice_qxl_create_primary_surface_async(&ssd->qxl, id, surface,
- (uint64_t)qxl_cookie_new(QXL_COOKIE_TYPE_IO,
- QXL_IO_CREATE_PRIMARY_ASYNC));
+ (uintptr_t)qxl_cookie_new(QXL_COOKIE_TYPE_IO,
+ QXL_IO_CREATE_PRIMARY_ASYNC));
} else {
ssd->worker->create_primary_surface(ssd->worker, id, surface);
}
@@ -106,8 +106,8 @@ void qemu_spice_destroy_primary_surface(SimpleSpiceDisplay *ssd,
{
if (async != QXL_SYNC) {
spice_qxl_destroy_primary_surface_async(&ssd->qxl, id,
- (uint64_t)qxl_cookie_new(QXL_COOKIE_TYPE_IO,
- QXL_IO_DESTROY_PRIMARY_ASYNC));
+ (uintptr_t)qxl_cookie_new(QXL_COOKIE_TYPE_IO,
+ QXL_IO_DESTROY_PRIMARY_ASYNC));
} else {
ssd->worker->destroy_primary_surface(ssd->worker, id);
}
--
1.7.5.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] ui/spice-display.c: Fix compilation warnings on 32 bit hosts
2012-03-07 13:36 [Qemu-devel] [PATCH] ui/spice-display.c: Fix compilation warnings on 32 bit hosts Peter Maydell
@ 2012-03-07 13:46 ` Alon Levy
0 siblings, 0 replies; 2+ messages in thread
From: Alon Levy @ 2012-03-07 13:46 UTC (permalink / raw)
To: Peter Maydell; +Cc: qemu-devel, Gerd Hoffmann
On Wed, Mar 07, 2012 at 01:36:48PM +0000, Peter Maydell wrote:
> Fix compilation failures ("cast from pointer to integer of
> different size [-Werror=pointer-to-int-cast]") by using
> uintptr_t instead.
>
Looks good, Thanks.
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> NB: compile tested only but should be safe :-)
>
> ui/spice-display.c | 12 ++++++------
> 1 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/ui/spice-display.c b/ui/spice-display.c
> index ab266ae..35499e2 100644
> --- a/ui/spice-display.c
> +++ b/ui/spice-display.c
> @@ -75,8 +75,8 @@ void qemu_spice_add_memslot(SimpleSpiceDisplay *ssd, QXLDevMemSlot *memslot,
> {
> if (async != QXL_SYNC) {
> spice_qxl_add_memslot_async(&ssd->qxl, memslot,
> - (uint64_t)qxl_cookie_new(QXL_COOKIE_TYPE_IO,
> - QXL_IO_MEMSLOT_ADD_ASYNC));
> + (uintptr_t)qxl_cookie_new(QXL_COOKIE_TYPE_IO,
> + QXL_IO_MEMSLOT_ADD_ASYNC));
> } else {
> ssd->worker->add_memslot(ssd->worker, memslot);
> }
> @@ -93,8 +93,8 @@ void qemu_spice_create_primary_surface(SimpleSpiceDisplay *ssd, uint32_t id,
> {
> if (async != QXL_SYNC) {
> spice_qxl_create_primary_surface_async(&ssd->qxl, id, surface,
> - (uint64_t)qxl_cookie_new(QXL_COOKIE_TYPE_IO,
> - QXL_IO_CREATE_PRIMARY_ASYNC));
> + (uintptr_t)qxl_cookie_new(QXL_COOKIE_TYPE_IO,
> + QXL_IO_CREATE_PRIMARY_ASYNC));
> } else {
> ssd->worker->create_primary_surface(ssd->worker, id, surface);
> }
> @@ -106,8 +106,8 @@ void qemu_spice_destroy_primary_surface(SimpleSpiceDisplay *ssd,
> {
> if (async != QXL_SYNC) {
> spice_qxl_destroy_primary_surface_async(&ssd->qxl, id,
> - (uint64_t)qxl_cookie_new(QXL_COOKIE_TYPE_IO,
> - QXL_IO_DESTROY_PRIMARY_ASYNC));
> + (uintptr_t)qxl_cookie_new(QXL_COOKIE_TYPE_IO,
> + QXL_IO_DESTROY_PRIMARY_ASYNC));
> } else {
> ssd->worker->destroy_primary_surface(ssd->worker, id);
> }
> --
> 1.7.5.4
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-03-07 13:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-07 13:36 [Qemu-devel] [PATCH] ui/spice-display.c: Fix compilation warnings on 32 bit hosts Peter Maydell
2012-03-07 13:46 ` Alon Levy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).