summaryrefslogtreecommitdiff
path: root/hw/dmx
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2011-01-20 18:46:00 -0500
committerAdam Jackson <ajax@redhat.com>2011-01-20 21:03:03 -0500
commitb02e006b2733ea457df41791f6054309e4edf7f6 (patch)
tree84f5a94613e27474e010fb4a4a81927c3e3b91a1 /hw/dmx
parentc6aa4755ec355101a62bef86dbb090262fe806f6 (diff)
dmx: warning fixes
Dear gcc: I do not care about machines where sizeof(void *) < sizeof(int), and neither should you. dmxextension.c: In function ‘dmxBECreateResources’: dmxextension.c:858:26: warning: cast from pointer to integer of different size dmxextension.c: In function ‘dmxBERestoreRenderPict’: dmxextension.c:1062:29: warning: cast from pointer to integer of different size dmxextension.c: In function ‘dmxBERestoreRenderGlyph’: dmxextension.c:1084:35: warning: cast from pointer to integer of different size dmxextension.c: In function ‘dmxAttachScreen’: dmxextension.c:1277:8: warning: cast to pointer from integer of different size dmxextension.c:1286:34: warning: cast to pointer from integer of different size dmxextension.c:1292:35: warning: cast to pointer from integer of different size dmxextension.c: In function ‘dmxBEDestroyResources’: dmxextension.c:1456:26: warning: cast from pointer to integer of different size dmxextension.c: In function ‘dmxDetachScreen’: dmxextension.c:1599:8: warning: cast to pointer from integer of different size Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'hw/dmx')
-rw-r--r--hw/dmx/dmxextension.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/hw/dmx/dmxextension.c b/hw/dmx/dmxextension.c
index 45cb3db93..bd326ce2a 100644
--- a/hw/dmx/dmxextension.c
+++ b/hw/dmx/dmxextension.c
@@ -855,7 +855,7 @@ static void dmxBERestorePixmap(PixmapPtr pPixmap)
static void dmxBECreateResources(pointer value, XID id, RESTYPE type,
pointer n)
{
- int scrnNum = (int)n;
+ int scrnNum = (uintptr_t)n;
ScreenPtr pScreen = screenInfo.screens[scrnNum];
if ((type & TypeMask) == (RT_WINDOW & TypeMask)) {
@@ -1059,7 +1059,7 @@ static void dmxBERestoreRenderPict(pointer value, XID id, pointer n)
{
PicturePtr pPicture = value; /* The picture */
DrawablePtr pDraw = pPicture->pDrawable; /* The picture's drawable */
- int scrnNum = (int)n;
+ int scrnNum = (uintptr_t)n;
if (pDraw->pScreen->myNum != scrnNum) {
/* Picture not on the screen we are restoring*/
@@ -1081,7 +1081,7 @@ static void dmxBERestoreRenderPict(pointer value, XID id, pointer n)
static void dmxBERestoreRenderGlyph(pointer value, XID id, pointer n)
{
GlyphSetPtr glyphSet = value;
- int scrnNum = (int)n;
+ int scrnNum = (uintptr_t)n;
dmxGlyphPrivPtr glyphPriv = DMX_GET_GLYPH_PRIV(glyphSet);
DMXScreenInfo *dmxScreen = &dmxScreens[scrnNum];
GlyphRefPtr table;
@@ -1274,7 +1274,7 @@ int dmxAttachScreen(int idx, DMXScreenAttributesPtr attr)
for (i = currentMaxClients; --i >= 0; )
if (clients[i])
FindAllClientResources(clients[i], dmxBECreateResources,
- (pointer)idx);
+ (pointer)(uintptr_t)idx);
/* Create window hierarchy (top down) */
dmxBECreateWindowTree(idx);
@@ -1283,13 +1283,15 @@ int dmxAttachScreen(int idx, DMXScreenAttributesPtr attr)
for (i = currentMaxClients; --i >= 0; )
if (clients[i])
FindClientResourcesByType(clients[i],PictureType,
- dmxBERestoreRenderPict,(pointer)idx);
+ dmxBERestoreRenderPict,
+ (pointer)(uintptr_t)idx);
/* Restore the glyph state for RENDER */
for (i = currentMaxClients; --i >= 0; )
if (clients[i])
FindClientResourcesByType(clients[i],GlyphSetType,
- dmxBERestoreRenderGlyph,(pointer)idx);
+ dmxBERestoreRenderGlyph,
+ (pointer)(uintptr_t)idx);
/* Refresh screen by generating exposure events for all windows */
dmxForceExposures(idx);
@@ -1453,7 +1455,7 @@ static void dmxBESavePixmap(PixmapPtr pPixmap)
static void dmxBEDestroyResources(pointer value, XID id, RESTYPE type,
pointer n)
{
- int scrnNum = (int)n;
+ int scrnNum = (uintptr_t)n;
ScreenPtr pScreen = screenInfo.screens[scrnNum];
if ((type & TypeMask) == (RT_WINDOW & TypeMask)) {
@@ -1596,7 +1598,7 @@ int dmxDetachScreen(int idx)
for (i = currentMaxClients; --i >= 0; )
if (clients[i])
FindAllClientResources(clients[i], dmxBEDestroyResources,
- (pointer)idx);
+ (pointer)(uintptr_t)idx);
/* Free scratch GCs */
dmxBEDestroyScratchGCs(idx);