[Spice-devel] [PATCH 3/3] server: Use the QXLPHYSICAL macros for conversions to/from pointers
Christophe Fergeau
cfergeau at redhat.com
Wed Jan 6 02:58:08 PST 2016
On Mon, Dec 28, 2015 at 11:06:47AM +0100, Francois Gouget wrote:
> This avoids compilation errors with -Werror on 32 bit systems.
>
> Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
> ---
> src/spiceqxl_display.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/spiceqxl_display.c b/src/spiceqxl_display.c
> index a3a8978..00a84bd 100644
> --- a/src/spiceqxl_display.c
> +++ b/src/spiceqxl_display.c
> @@ -24,6 +24,7 @@
> #endif
>
> #include <spice.h>
> +#include <spice/qxl_dev.h>
>
> #include "qxl.h"
> #include "spiceqxl_display.h"
> @@ -350,6 +351,6 @@ void qxl_add_spice_display_interface(qxl_screen_t *qxl)
>
> void spiceqxl_display_monitors_config(qxl_screen_t *qxl)
> {
> - spice_qxl_monitors_config_async(&qxl->display_sin, (QXLPHYSICAL)qxl->monitors_config,
> + spice_qxl_monitors_config_async(&qxl->display_sin, PTR_TO_QXLPHYSICAL(qxl->monitors_config),
> MEMSLOT_GROUP, 0);
> }
As mentioned in 1/3, I'd rather not add PTR_TO_QXLPHYSICAL to
spice-protocol. You can just open-code the needed magic for the cast
here. Or maybe physical_address(qxl, qxl->monitors_config, 0); would do
the trick.
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20160106/4d595510/attachment.sig>
More information about the Spice-devel
mailing list