summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Xext/xtest.c6
-rw-r--r--composite/compwindow.c4
-rw-r--r--dix/events.c4
-rw-r--r--glx/glxcmds.c2
-rw-r--r--hw/xfree86/dri/dri.c8
-rw-r--r--hw/xfree86/os-support/bus/linuxPci.c2
6 files changed, 14 insertions, 12 deletions
diff --git a/Xext/xtest.c b/Xext/xtest.c
index 6b0e9fd14..5af2b5c83 100644
--- a/Xext/xtest.c
+++ b/Xext/xtest.c
@@ -640,8 +640,8 @@ int AllocXTestDevice (ClientPtr client, char* name,
retval = AllocDevicePair( client, xtestname, ptr, keybd, CorePointerProc, CoreKeyboardProc, FALSE);
if ( retval == Success ){
- dixSetPrivate(&((*ptr)->devPrivates), XTestDevicePrivateKey, (void *)master_ptr->id);
- dixSetPrivate(&((*keybd)->devPrivates), XTestDevicePrivateKey, (void *)master_keybd->id);
+ dixSetPrivate(&((*ptr)->devPrivates), XTestDevicePrivateKey, (void *)(intptr_t)master_ptr->id);
+ dixSetPrivate(&((*keybd)->devPrivates), XTestDevicePrivateKey, (void *)(intptr_t)master_keybd->id);
XIChangeDeviceProperty(*ptr, XIGetKnownProperty(XI_PROP_XTEST_DEVICE),
XA_INTEGER, 8, PropModeReplace, 1, &dummy,
@@ -677,7 +677,7 @@ IsXTestDevice(DeviceIntPtr dev, DeviceIntPtr master)
return is_XTest;
tmp = dixLookupPrivate(&dev->devPrivates, XTestDevicePrivateKey);
- mid = (int)tmp;
+ mid = (intptr_t)tmp;
/* deviceid 0 is reserved for XIAllDevices, non-zero mid means XTest
* device */
diff --git a/composite/compwindow.c b/composite/compwindow.c
index 4267a51c7..9bc43b05b 100644
--- a/composite/compwindow.c
+++ b/composite/compwindow.c
@@ -99,7 +99,7 @@ static Bool
compRepaintBorder (ClientPtr pClient, pointer closure)
{
WindowPtr pWindow;
- int rc = dixLookupWindow(&pWindow, (XID)closure, pClient, DixWriteAccess);
+ int rc = dixLookupWindow(&pWindow, (XID)(intptr_t)closure, pClient, DixWriteAccess);
if (rc == Success) {
RegionRec exposed;
@@ -130,7 +130,7 @@ compSetPixmapVisitWindow (WindowPtr pWindow, pointer data)
SetBorderSize (pWindow);
if (HasBorder (pWindow))
QueueWorkProc (compRepaintBorder, serverClient,
- (pointer) pWindow->drawable.id);
+ (pointer)(intptr_t) pWindow->drawable.id);
return WT_WALKCHILDREN;
}
diff --git a/dix/events.c b/dix/events.c
index d60b8a534..14e3900b9 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -1460,7 +1460,7 @@ static DevPrivateKey GrabPrivateKey = &GrabPrivateKeyIndex;
static void
DetachFromMaster(DeviceIntPtr dev)
{
- int id;
+ intptr_t id;
if (!dev->u.master)
return;
@@ -1482,7 +1482,7 @@ ReattachToOldMaster(DeviceIntPtr dev)
p = dixLookupPrivate(&dev->devPrivates, GrabPrivateKey);
- id = (int)p; /* silence gcc warnings */
+ id = (intptr_t) p; /* silence gcc warnings */
dixLookupDevice(&master, id, serverClient, DixUseAccess);
if (master)
diff --git a/glx/glxcmds.c b/glx/glxcmds.c
index ba4c12398..eedab652f 100644
--- a/glx/glxcmds.c
+++ b/glx/glxcmds.c
@@ -2057,7 +2057,7 @@ int __glXDisp_BindSwapBarrierSGIX(__GLXclientState *cl, GLbyte *pc)
if (ret == Success) {
if (barrier)
/* add source for cleanup when drawable is gone */
- AddResource(drawable, __glXSwapBarrierRes, (pointer)screen);
+ AddResource(drawable, __glXSwapBarrierRes, (pointer)(intptr_t)screen);
else
/* delete source */
FreeResourceByType(drawable, __glXSwapBarrierRes, FALSE);
diff --git a/hw/xfree86/dri/dri.c b/hw/xfree86/dri/dri.c
index faddfe6ec..0de9be621 100644
--- a/hw/xfree86/dri/dri.c
+++ b/hw/xfree86/dri/dri.c
@@ -1277,7 +1277,7 @@ DRICreateDrawable(ScreenPtr pScreen, ClientPtr client, DrawablePtr pDrawable,
/* track this in case the client dies */
AddResource(FakeClientID(client->index), DRIDrawablePrivResType,
- (pointer)pDrawable->id);
+ (pointer)(intptr_t)pDrawable->id);
if (pDRIDrawablePriv->hwDrawable) {
drmUpdateDrawableInfo(pDRIPriv->drmFD,
@@ -1348,7 +1348,7 @@ DRIDestroyDrawable(ScreenPtr pScreen, ClientPtr client, DrawablePtr pDrawable)
if (pDrawable->type == DRAWABLE_WINDOW) {
LookupClientResourceComplex(client, DRIDrawablePrivResType,
DRIDestroyDrawableCB,
- (pointer)pDrawable->id);
+ (pointer)(intptr_t)pDrawable->id);
}
else { /* pixmap (or for GLX 1.3, a PBuffer) */
/* NOT_DONE */
@@ -1364,7 +1364,9 @@ DRIDrawablePrivDelete(pointer pResource, XID id)
WindowPtr pWin;
int rc;
- id = (XID)pResource;
+ /* For DRIDrawablePrivResType, the XID is the client's fake ID. The
+ * important XID is the value in pResource. */
+ id = (XID)(intptr_t)pResource;
rc = dixLookupWindow(&pWin, id, serverClient, DixGetAttrAccess);
if (rc == Success) {
diff --git a/hw/xfree86/os-support/bus/linuxPci.c b/hw/xfree86/os-support/bus/linuxPci.c
index 920a14949..289315ebc 100644
--- a/hw/xfree86/os-support/bus/linuxPci.c
+++ b/hw/xfree86/os-support/bus/linuxPci.c
@@ -445,7 +445,7 @@ xf86MapLegacyIO(struct pci_device *dev)
PCIIOC_MMAP_IS_IO);
}
else { /* legacy_io file exists, encode fd */
- DomainMmappedIO[domain] = (pointer)(fd << 24);
+ DomainMmappedIO[domain] = (pointer)(intptr_t)(fd << 24);
}
}