summaryrefslogtreecommitdiff
path: root/Xext/shm.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2013-12-15 01:05:51 -0800
committerKeith Packard <keithp@keithp.com>2014-01-12 10:24:11 -0800
commit60014a4a98ff924ae7f6840781f768c1cc93bbab (patch)
treea956a03a6a7c87cac4d48fb95b66fec313d87fde /Xext/shm.c
parent93fa64e17d7bd600ebf18ecab85f5b2d17fe30ce (diff)
Replace 'pointer' type with 'void *'
This lets us stop using the 'pointer' typedef in Xdefs.h as 'pointer' is used throughout the X server for other things, and having duplicate names generates compiler warnings. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'Xext/shm.c')
-rw-r--r--Xext/shm.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/Xext/shm.c b/Xext/shm.c
index 1957a9525..34545ecff 100644
--- a/Xext/shm.c
+++ b/Xext/shm.c
@@ -99,7 +99,7 @@ typedef struct _ShmScrPrivateRec {
} ShmScrPrivateRec;
static PixmapPtr fbShmCreatePixmap(XSHM_CREATE_PIXMAP_ARGS);
-static int ShmDetachSegment(pointer /* value */ ,
+static int ShmDetachSegment(void */* value */ ,
XID /* shmseg */
);
static void ShmResetProc(ExtensionEntry * /* extEntry */
@@ -130,7 +130,7 @@ static ShmFuncs fbFuncs = { fbShmCreatePixmap, NULL };
#define VERIFY_SHMSEG(shmseg,shmdesc,client) \
{ \
int tmprc; \
- tmprc = dixLookupResourceByType((pointer *)&(shmdesc), shmseg, ShmSegType, \
+ tmprc = dixLookupResourceByType((void **)&(shmdesc), shmseg, ShmSegType, \
client, DixReadAccess); \
if (tmprc != Success) \
return tmprc; \
@@ -260,7 +260,7 @@ ShmDestroyPixmap(PixmapPtr pPixmap)
shmdesc = (ShmDescPtr) dixLookupPrivate(&pPixmap->devPrivates,
shmPixmapPrivateKey);
if (shmdesc)
- ShmDetachSegment((pointer) shmdesc, pPixmap->drawable.id);
+ ShmDetachSegment((void *) shmdesc, pPixmap->drawable.id);
}
pScreen->DestroyPixmap = screen_priv->destroyPixmap;
@@ -425,13 +425,13 @@ ProcShmAttach(ClientPtr client)
shmdesc->next = Shmsegs;
Shmsegs = shmdesc;
}
- if (!AddResource(stuff->shmseg, ShmSegType, (pointer) shmdesc))
+ if (!AddResource(stuff->shmseg, ShmSegType, (void *) shmdesc))
return BadAlloc;
return Success;
}
/*ARGSUSED*/ static int
-ShmDetachSegment(pointer value, /* must conform to DeleteType */
+ShmDetachSegment(void *value, /* must conform to DeleteType */
XID shmseg)
{
ShmDescPtr shmdesc = (ShmDescPtr) value;
@@ -729,12 +729,12 @@ ProcPanoramiXShmPutImage(ClientPtr client)
REQUEST(xShmPutImageReq);
REQUEST_SIZE_MATCH(xShmPutImageReq);
- result = dixLookupResourceByClass((pointer *) &draw, stuff->drawable,
+ result = dixLookupResourceByClass((void **) &draw, stuff->drawable,
XRC_DRAWABLE, client, DixWriteAccess);
if (result != Success)
return (result == BadValue) ? BadDrawable : result;
- result = dixLookupResourceByType((pointer *) &gc, stuff->gc,
+ result = dixLookupResourceByType((void **) &gc, stuff->gc,
XRT_GC, client, DixReadAccess);
if (result != Success)
return result;
@@ -783,7 +783,7 @@ ProcPanoramiXShmGetImage(ClientPtr client)
return BadValue;
}
- rc = dixLookupResourceByClass((pointer *) &draw, stuff->drawable,
+ rc = dixLookupResourceByClass((void **) &draw, stuff->drawable,
XRC_DRAWABLE, client, DixWriteAccess);
if (rc != Success)
return (rc == BadValue) ? BadDrawable : rc;
@@ -980,7 +980,7 @@ ProcPanoramiXShmCreatePixmap(ClientPtr client)
shmdesc->refcnt++;
pMap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
pMap->drawable.id = newPix->info[j].id;
- if (!AddResource(newPix->info[j].id, RT_PIXMAP, (pointer) pMap)) {
+ if (!AddResource(newPix->info[j].id, RT_PIXMAP, (void *) pMap)) {
result = BadAlloc;
break;
}
@@ -1016,7 +1016,7 @@ fbShmCreatePixmap(ScreenPtr pScreen,
if (!(*pScreen->ModifyPixmapHeader) (pPixmap, width, height, depth,
BitsPerPixel(depth),
PixmapBytePad(width, depth),
- (pointer) addr)) {
+ (void *) addr)) {
(*pScreen->DestroyPixmap) (pPixmap);
return NullPixmap;
}
@@ -1095,7 +1095,7 @@ ProcShmCreatePixmap(ClientPtr client)
shmdesc->refcnt++;
pMap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
pMap->drawable.id = stuff->pid;
- if (AddResource(stuff->pid, RT_PIXMAP, (pointer) pMap)) {
+ if (AddResource(stuff->pid, RT_PIXMAP, (void *) pMap)) {
return Success;
}
}
@@ -1172,7 +1172,7 @@ ProcShmAttachFd(ClientPtr client)
shmdesc->next = Shmsegs;
Shmsegs = shmdesc;
- if (!AddResource(stuff->shmseg, ShmSegType, (pointer) shmdesc))
+ if (!AddResource(stuff->shmseg, ShmSegType, (void *) shmdesc))
return BadAlloc;
return Success;
}
@@ -1263,7 +1263,7 @@ ProcShmCreateSegment(ClientPtr client)
shmdesc->next = Shmsegs;
Shmsegs = shmdesc;
- if (!AddResource(stuff->shmseg, ShmSegType, (pointer) shmdesc)) {
+ if (!AddResource(stuff->shmseg, ShmSegType, (void *) shmdesc)) {
close(fd);
return BadAlloc;
}