[Spice-devel] [PATCH 1/3] protocol: Add macros to help convert QXLPHYSICAL to/from pointers

Christophe Fergeau cfergeau at redhat.com
Wed Jan 6 02:39:50 PST 2016


Hey,

On Mon, Dec 28, 2015 at 11:06:37AM +0100, Francois Gouget wrote:
> On 32 bit systems the QXLPHYSICAL integer size deos not match the size
> of a pointer so special care must be taken in the conversions to avoid
> compiler errors with -Werror.

In general (virtualization usecase), you cannot cast between a
QXLPHYSICAL and a pointer, you need to go through some more complicated
conversion. Some care also needs to be taken when using these macros as
QXLPHYSICAL to pointer is going to be truncated on 32-bit.

Since the next patches only change 1 place in the qxl driver, and one
file in spice-server, I would only add these macros to these specific
files, and not add it to spice-protocol.

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/4719da6d/attachment.sig>


More information about the Spice-devel mailing list