From 68dd0b52e13c844d662192654fb10cb993257a59 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Mon, 22 Jun 2015 09:36:08 +0200 Subject: 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 Reviewed-by: Eric Anholt Rebased against NX: Mike Gabriel --- nx-X11/programs/Xserver/dix/resource.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'nx-X11/programs/Xserver/dix/resource.c') diff --git a/nx-X11/programs/Xserver/dix/resource.c b/nx-X11/programs/Xserver/dix/resource.c index e12bc7b67..e0fc2b997 100644 --- a/nx-X11/programs/Xserver/dix/resource.c +++ b/nx-X11/programs/Xserver/dix/resource.c @@ -139,7 +139,7 @@ typedef struct _Resource { struct _Resource *next; XID id; RESTYPE type; - pointer value; + void * value; } ResourceRec, *ResourcePtr; #define NullResource ((ResourcePtr)NULL) @@ -423,7 +423,7 @@ FakeClientID(register int client) } Bool -AddResource(XID id, RESTYPE type, pointer value) +AddResource(XID id, RESTYPE type, void * value) { int client; register ClientResourceRec *rrec; @@ -595,7 +595,7 @@ FreeResourceByType(XID id, RESTYPE type, Bool skipFree) */ Bool -ChangeResourceValue (XID id, RESTYPE rtype, pointer value) +ChangeResourceValue (XID id, RESTYPE rtype, void * value) { int cid; register ResourcePtr res; @@ -627,7 +627,7 @@ FindClientResourcesByType( ClientPtr client, RESTYPE type, FindResType func, - pointer cdata + void * cdata ){ register ResourcePtr *resources; register ResourcePtr this, next; @@ -658,7 +658,7 @@ void FindAllClientResources( ClientPtr client, FindAllRes func, - pointer cdata + void * cdata ){ register ResourcePtr *resources; register ResourcePtr this, next; @@ -684,12 +684,12 @@ FindAllClientResources( } -pointer +void * LookupClientResourceComplex( ClientPtr client, RESTYPE type, FindComplexResType func, - pointer cdata + void * cdata ){ ResourcePtr *resources; ResourcePtr this; @@ -831,12 +831,12 @@ LegalNewID(XID id, register ClientPtr client) * else NULL is returned. */ -pointer +void * SecurityLookupIDByType(ClientPtr client, XID id, RESTYPE rtype, Mask mode) { int cid; register ResourcePtr res; - pointer retval = NULL; + void * retval = NULL; assert(client == NullClient || (client->index <= currentMaxClients && clients[client->index] == client)); @@ -860,12 +860,12 @@ SecurityLookupIDByType(ClientPtr client, XID id, RESTYPE rtype, Mask mode) } -pointer +void * SecurityLookupIDByClass(ClientPtr client, XID id, RESTYPE classes, Mask mode) { int cid; register ResourcePtr res = NULL; - pointer retval = NULL; + void * retval = NULL; assert(client == NullClient || (client->index <= currentMaxClients && clients[client->index] == client)); @@ -892,14 +892,14 @@ SecurityLookupIDByClass(ClientPtr client, XID id, RESTYPE classes, Mask mode) * macros because of compatibility with loadable servers. */ -pointer +void * LookupIDByType(XID id, RESTYPE rtype) { return SecurityLookupIDByType(NullClient, id, rtype, SecurityUnknownAccess); } -pointer +void * LookupIDByClass(XID id, RESTYPE classes) { return SecurityLookupIDByClass(NullClient, id, classes, @@ -911,7 +911,7 @@ LookupIDByClass(XID id, RESTYPE classes) /* * LookupIDByType returns the object with the given id and type, else NULL. */ -pointer +void * LookupIDByType(XID id, RESTYPE rtype) { int cid; @@ -926,14 +926,14 @@ LookupIDByType(XID id, RESTYPE rtype) if ((res->id == id) && (res->type == rtype)) return res->value; } - return (pointer)NULL; + return (void *)NULL; } /* * LookupIDByClass returns the object with the given id and any one of the * given classes, else NULL. */ -pointer +void * LookupIDByClass(XID id, RESTYPE classes) { int cid; @@ -948,7 +948,7 @@ LookupIDByClass(XID id, RESTYPE classes) if ((res->id == id) && (res->type & classes)) return res->value; } - return (pointer)NULL; + return (void *)NULL; } #endif /* XCSECURITY */ -- cgit v1.2.3