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/hw/nxagent/NXresource.c | 38 ++++++++++++------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'nx-X11/programs/Xserver/hw/nxagent/NXresource.c') diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXresource.c b/nx-X11/programs/Xserver/hw/nxagent/NXresource.c index d1c8325f2..833a33fd3 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXresource.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXresource.c @@ -170,7 +170,7 @@ typedef struct _Resource { struct _Resource *next; XID id; RESTYPE type; - pointer value; + void * value; } ResourceRec, *ResourcePtr; #define NullResource ((ResourcePtr)NULL) @@ -459,7 +459,7 @@ FakeClientID(register int client) #ifdef NXAGENT_SERVER -int nxagentFindClientResource(int client, RESTYPE type, pointer value) +int nxagentFindClientResource(int client, RESTYPE type, void * value) { ResourcePtr pResource; ResourcePtr *resources; @@ -488,7 +488,7 @@ int nxagentFindClientResource(int client, RESTYPE type, pointer value) return 0; } -int nxagentSwitchResourceType(int client, RESTYPE type, pointer value) +int nxagentSwitchResourceType(int client, RESTYPE type, void * value) { ResourcePtr pResource; ResourcePtr *resources; @@ -552,7 +552,7 @@ int nxagentSwitchResourceType(int client, RESTYPE type, pointer value) #endif Bool -AddResource(XID id, RESTYPE type, pointer value) +AddResource(XID id, RESTYPE type, void * value) { int client; register ClientResourceRec *rrec; @@ -753,7 +753,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; @@ -785,7 +785,7 @@ FindClientResourcesByType( ClientPtr client, RESTYPE type, FindResType func, - pointer cdata + void * cdata ){ register ResourcePtr *resources; register ResourcePtr this, next; @@ -870,7 +870,7 @@ void FindAllClientResources( ClientPtr client, FindAllRes func, - pointer cdata + void * cdata ){ register ResourcePtr *resources; register ResourcePtr this, next; @@ -950,12 +950,12 @@ RestartLoop: } -pointer +void * LookupClientResourceComplex( ClientPtr client, RESTYPE type, FindComplexResType func, - pointer cdata + void * cdata ){ ResourcePtr *resources; ResourcePtr this; @@ -1126,12 +1126,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)); @@ -1155,12 +1155,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)); @@ -1187,14 +1187,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, @@ -1206,7 +1206,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; @@ -1221,14 +1221,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; @@ -1243,7 +1243,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