summaryrefslogtreecommitdiff
path: root/Xi
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 /Xi
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 'Xi')
-rw-r--r--Xi/devbell.c6
-rw-r--r--Xi/exevents.c12
-rw-r--r--Xi/extinit.c2
-rw-r--r--Xi/xibarriers.c4
-rw-r--r--Xi/xichangecursor.c2
-rw-r--r--Xi/xiproperty.c8
6 files changed, 17 insertions, 17 deletions
diff --git a/Xi/devbell.c b/Xi/devbell.c
index 202c8de18..07865d270 100644
--- a/Xi/devbell.c
+++ b/Xi/devbell.c
@@ -91,7 +91,7 @@ ProcXDeviceBell(ClientPtr client)
int rc, base;
int newpercent;
CARD8 class;
- pointer ctrl;
+ void *ctrl;
BellProcPtr proc;
REQUEST(xDeviceBellReq);
@@ -117,7 +117,7 @@ ProcXDeviceBell(ClientPtr client)
}
base = k->ctrl.bell;
proc = k->BellProc;
- ctrl = (pointer) &(k->ctrl);
+ ctrl = (void *) &(k->ctrl);
class = KbdFeedbackClass;
}
else if (stuff->feedbackclass == BellFeedbackClass) {
@@ -130,7 +130,7 @@ ProcXDeviceBell(ClientPtr client)
}
base = b->ctrl.percent;
proc = b->BellProc;
- ctrl = (pointer) &(b->ctrl);
+ ctrl = (void *) &(b->ctrl);
class = BellFeedbackClass;
}
else {
diff --git a/Xi/exevents.c b/Xi/exevents.c
index dff0a92b0..9d8416b4a 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -1302,7 +1302,7 @@ RetrieveTouchDeliveryData(DeviceIntPtr dev, TouchPointInfoPtr ti,
*mask = (*grab)->xi2mask;
}
else {
- rc = dixLookupResourceByType((pointer *) win, listener->listener,
+ rc = dixLookupResourceByType((void **) win, listener->listener,
listener->resource_type,
serverClient, DixSendAccess);
if (rc != Success)
@@ -1735,7 +1735,7 @@ ProcessDeviceEvent(InternalEvent *ev, DeviceIntPtr device)
eventinfo.device = device;
eventinfo.event = ev;
- CallCallbacks(&DeviceEventCallback, (pointer) &eventinfo);
+ CallCallbacks(&DeviceEventCallback, (void *) &eventinfo);
}
grab = device->deviceGrab.grab;
@@ -2204,7 +2204,7 @@ GrabButton(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr modifier_device,
if (param->cursor == None)
cursor = NullCursor;
else {
- rc = dixLookupResourceByType((pointer *) &cursor, param->cursor,
+ rc = dixLookupResourceByType((void **) &cursor, param->cursor,
RT_CURSOR, client, DixUseAccess);
if (rc != Success) {
client->errorValue = param->cursor;
@@ -2303,7 +2303,7 @@ GrabWindow(ClientPtr client, DeviceIntPtr dev, int type,
if (param->cursor == None)
cursor = NullCursor;
else {
- rc = dixLookupResourceByType((pointer *) &cursor, param->cursor,
+ rc = dixLookupResourceByType((void **) &cursor, param->cursor,
RT_CURSOR, client, DixUseAccess);
if (rc != Success) {
client->errorValue = param->cursor;
@@ -2446,7 +2446,7 @@ AddExtensionClient(WindowPtr pWin, ClientPtr client, Mask mask, int mskidx)
others->resource = FakeClientID(client->index);
others->next = pWin->optional->inputMasks->inputClients;
pWin->optional->inputMasks->inputClients = others;
- if (!AddResource(others->resource, RT_INPUTCLIENT, (pointer) pWin))
+ if (!AddResource(others->resource, RT_INPUTCLIENT, (void *) pWin))
goto bail;
return Success;
@@ -2548,7 +2548,7 @@ InputClientGone(WindowPtr pWin, XID id)
else {
other->resource = FakeClientID(0);
if (!AddResource(other->resource, RT_INPUTCLIENT,
- (pointer) pWin))
+ (void *) pWin))
return BadAlloc;
}
}
diff --git a/Xi/extinit.c b/Xi/extinit.c
index c13bc475e..9ebd733ab 100644
--- a/Xi/extinit.c
+++ b/Xi/extinit.c
@@ -381,7 +381,7 @@ DevPrivateKeyRec XIClientPrivateKeyRec;
*/
static void
-XIClientCallback(CallbackListPtr *list, pointer closure, pointer data)
+XIClientCallback(CallbackListPtr *list, void *closure, void *data)
{
NewClientInfoRec *clientinfo = (NewClientInfoRec *) data;
ClientPtr pClient = clientinfo->client;
diff --git a/Xi/xibarriers.c b/Xi/xibarriers.c
index 6732ce9dc..a8b92cc18 100644
--- a/Xi/xibarriers.c
+++ b/Xi/xibarriers.c
@@ -695,7 +695,7 @@ BarrierFreeBarrier(void *data, XID id)
return Success;
}
-static void add_master_func(pointer res, XID id, pointer devid)
+static void add_master_func(void *res, XID id, void *devid)
{
struct PointerBarrier *b;
struct PointerBarrierClient *barrier;
@@ -712,7 +712,7 @@ static void add_master_func(pointer res, XID id, pointer devid)
xorg_list_add(&pbd->entry, &barrier->per_device);
}
-static void remove_master_func(pointer res, XID id, pointer devid)
+static void remove_master_func(void *res, XID id, void *devid)
{
struct PointerBarrierDevice *pbd;
struct PointerBarrierClient *barrier;
diff --git a/Xi/xichangecursor.c b/Xi/xichangecursor.c
index 0be6bc0d4..7a1bb7a0d 100644
--- a/Xi/xichangecursor.c
+++ b/Xi/xichangecursor.c
@@ -96,7 +96,7 @@ ProcXIChangeCursor(ClientPtr client)
pCursor = (CursorPtr) None;
}
else {
- rc = dixLookupResourceByType((pointer *) &pCursor, stuff->cursor,
+ rc = dixLookupResourceByType((void **) &pCursor, stuff->cursor,
RT_CURSOR, client, DixUseAccess);
if (rc != Success)
return rc;
diff --git a/Xi/xiproperty.c b/Xi/xiproperty.c
index 796ba0948..463607d33 100644
--- a/Xi/xiproperty.c
+++ b/Xi/xiproperty.c
@@ -723,10 +723,10 @@ XIChangeDeviceProperty(DeviceIntPtr dev, Atom property, Atom type,
total_len = prop_value->size + len;
if (mode == PropModeReplace || len > 0) {
- pointer new_data = NULL, old_data = NULL;
+ void *new_data = NULL, *old_data = NULL;
total_size = total_len * size_in_bytes;
- new_value.data = (pointer) malloc(total_size);
+ new_value.data = (void *) malloc(total_size);
if (!new_value.data && total_size) {
if (add)
XIDestroyDeviceProperty(prop);
@@ -742,13 +742,13 @@ XIChangeDeviceProperty(DeviceIntPtr dev, Atom property, Atom type,
old_data = NULL;
break;
case PropModeAppend:
- new_data = (pointer) (((char *) new_value.data) +
+ new_data = (void *) (((char *) new_value.data) +
(prop_value->size * size_in_bytes));
old_data = new_value.data;
break;
case PropModePrepend:
new_data = new_value.data;
- old_data = (pointer) (((char *) new_value.data) +
+ old_data = (void *) (((char *) new_value.data) +
(prop_value->size * size_in_bytes));
break;
}