Bug 72169 - Cannot compile xf86-video-qxl-0.1.1 with spice-protocol-0.12.3: spiceqxl_display.c:353:56: error: cast from pointer to integer of different size
Cannot compile xf86-video-qxl-0.1.1 with spice-protocol-0.12.3: spiceqxl_disp...
Status: NEW
Product: xorg
Classification: Unclassified
Component: Driver/qxl
unspecified
x86 (IA32) Linux (All)
: medium normal
Assigned To: Søren Sandmann Pedersen
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-30 12:03 UTC by Petr Pisar
Modified: 2014-01-07 06:38 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Pisar 2013-11-30 12:03:20 UTC
It's not possible to compile spiceqxl_display.c from xf86-video-qxl-0.1.1 with spice-protocol-0.12.3 on 32-bit x86 because there is a cast from pointer to u_int64_t which is not compatible with 32-bit pointers on x86:

/var/tmp/portage/x11-drivers/xf86-video-qxl-0.1.1/work/xf86-video-qxl-0.1.1/src/spiceqxl_display.c: In function 'spiceqxl_display_monitors_config':
/var/tmp/portage/x11-drivers/xf86-video-qxl-0.1.1/work/xf86-video-qxl-0.1.1/src/spiceqxl_display.c:353:56: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]

The bug is at src/spiceqxl_display.c:353 on casting second argument of spice_qxl_monitors_config_async() call:

void spiceqxl_display_monitors_config(qxl_screen_t *qxl)
{
    spice_qxl_monitors_config_async(&qxl->display_sin, (QXLPHYSICAL)qxl->monitors_config,
                                    MEMSLOT_GROUP, 0);
}

while spice-1/spice/qxl_dev.h:

typedef uint64_t QXLPHYSICAL;

and src/qxl.h:

typedef struct _qxl_screen_t qxl_screen_t;

struct _qxl_screen_t
{
  [...]
  struct QXLMonitorsConfig   *monitors_config;
  [...]
}