diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2016-07-04 00:28:47 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2016-07-05 13:32:05 +0200 |
commit | f6a1bda2dff0c70aa13f3cb763a9b08c4c037c53 (patch) | |
tree | 13abc7de22c00d7ab9080c47df749afbe94d8f85 /nx-X11/programs/Xserver/Xi | |
parent | ff81a52695821704a3eb33e8de8bb7fe55bccfe1 (diff) | |
download | nx-libs-f6a1bda2dff0c70aa13f3cb763a9b08c4c037c53.tar.gz nx-libs-f6a1bda2dff0c70aa13f3cb763a9b08c4c037c53.tar.bz2 nx-libs-f6a1bda2dff0c70aa13f3cb763a9b08c4c037c53.zip |
Remove unneccesary casts from WriteToClient calls
Casting return to (void) was used to tell lint that you intended
to ignore the return value, so it didn't warn you about it.
Casting the third argument to (char *) was used as the most generic
pointer type in the days before compilers supported C89 (void *)
(except for a couple places it's used for byte-sized pointer math).
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Tested-by: Daniel Stone <daniel@fooishbar.org>
Backport to nx-libs: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
Diffstat (limited to 'nx-X11/programs/Xserver/Xi')
21 files changed, 25 insertions, 25 deletions
diff --git a/nx-X11/programs/Xserver/Xi/chgdctl.c b/nx-X11/programs/Xserver/Xi/chgdctl.c index c2412df67..b462583fd 100644 --- a/nx-X11/programs/Xserver/Xi/chgdctl.c +++ b/nx-X11/programs/Xserver/Xi/chgdctl.c @@ -210,6 +210,6 @@ SRepXChangeDeviceControl (client, size, rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); - WriteToClient(client, size, (char *)rep); + WriteToClient(client, size, rep); } diff --git a/nx-X11/programs/Xserver/Xi/chgkbd.c b/nx-X11/programs/Xserver/Xi/chgkbd.c index f29c86e0d..e9466ba8f 100644 --- a/nx-X11/programs/Xserver/Xi/chgkbd.c +++ b/nx-X11/programs/Xserver/Xi/chgkbd.c @@ -208,5 +208,5 @@ SRepXChangeKeyboardDevice (client, size, rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); - WriteToClient(client, size, (char *)rep); + WriteToClient(client, size, rep); } diff --git a/nx-X11/programs/Xserver/Xi/chgptr.c b/nx-X11/programs/Xserver/Xi/chgptr.c index 6d87df415..31b3bbd8e 100644 --- a/nx-X11/programs/Xserver/Xi/chgptr.c +++ b/nx-X11/programs/Xserver/Xi/chgptr.c @@ -254,5 +254,5 @@ SRepXChangePointerDevice (client, size, rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); - WriteToClient(client, size, (char *)rep); + WriteToClient(client, size, rep); } diff --git a/nx-X11/programs/Xserver/Xi/getbmap.c b/nx-X11/programs/Xserver/Xi/getbmap.c index e571bc7dd..8421e3e5c 100644 --- a/nx-X11/programs/Xserver/Xi/getbmap.c +++ b/nx-X11/programs/Xserver/Xi/getbmap.c @@ -126,7 +126,7 @@ ProcXGetDeviceButtonMapping (client) rep.nElts = b->numButtons; rep.length = (rep.nElts + (4-1))/4; WriteReplyToClient (client, sizeof (xGetDeviceButtonMappingReply), &rep); - (void)WriteToClient(client, rep.nElts, + WriteToClient(client, rep.nElts, (char *)&b->map[1]); return Success; } @@ -146,5 +146,5 @@ SRepXGetDeviceButtonMapping (client, size, rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); - WriteToClient(client, size, (char *)rep); + WriteToClient(client, size, rep); } diff --git a/nx-X11/programs/Xserver/Xi/getdctl.c b/nx-X11/programs/Xserver/Xi/getdctl.c index 2af8db5ea..0205d5fe4 100644 --- a/nx-X11/programs/Xserver/Xi/getdctl.c +++ b/nx-X11/programs/Xserver/Xi/getdctl.c @@ -220,6 +220,6 @@ SRepXGetDeviceControl (client, size, rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); - WriteToClient(client, size, (char *)rep); + WriteToClient(client, size, rep); } diff --git a/nx-X11/programs/Xserver/Xi/getfctl.c b/nx-X11/programs/Xserver/Xi/getfctl.c index d5fd88b0a..6640e8481 100644 --- a/nx-X11/programs/Xserver/Xi/getfctl.c +++ b/nx-X11/programs/Xserver/Xi/getfctl.c @@ -408,5 +408,5 @@ SRepXGetFeedbackControl (client, size, rep) swaps(&rep->sequenceNumber); swapl(&rep->length); swaps(&rep->num_feedbacks); - WriteToClient(client, size, (char *)rep); + WriteToClient(client, size, rep); } diff --git a/nx-X11/programs/Xserver/Xi/getfocus.c b/nx-X11/programs/Xserver/Xi/getfocus.c index 6e2136d65..41c2a6e25 100644 --- a/nx-X11/programs/Xserver/Xi/getfocus.c +++ b/nx-X11/programs/Xserver/Xi/getfocus.c @@ -149,5 +149,5 @@ SRepXGetDeviceFocus (client, size, rep) swapl(&rep->length); swapl(&rep->focus); swapl(&rep->time); - WriteToClient(client, size, (char *)rep); + WriteToClient(client, size, rep); } diff --git a/nx-X11/programs/Xserver/Xi/getkmap.c b/nx-X11/programs/Xserver/Xi/getkmap.c index 29d4eb677..44f91868f 100644 --- a/nx-X11/programs/Xserver/Xi/getkmap.c +++ b/nx-X11/programs/Xserver/Xi/getkmap.c @@ -169,6 +169,6 @@ SRepXGetDeviceKeyMapping (client, size, rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); - WriteToClient(client, size, (char *)rep); + WriteToClient(client, size, rep); } diff --git a/nx-X11/programs/Xserver/Xi/getmmap.c b/nx-X11/programs/Xserver/Xi/getmmap.c index 773a65614..375f6f2e3 100644 --- a/nx-X11/programs/Xserver/Xi/getmmap.c +++ b/nx-X11/programs/Xserver/Xi/getmmap.c @@ -131,7 +131,7 @@ ProcXGetDeviceModifierMapping(client) WriteReplyToClient(client, sizeof(xGetDeviceModifierMappingReply), &rep); /* Reply with the (modified by DDX) map that SetModifierMapping passed in */ - WriteToClient(client, 8*maxkeys, (char *)kp->modifierKeyMap); + WriteToClient(client, 8*maxkeys, kp->modifierKeyMap); return Success; } @@ -150,5 +150,5 @@ SRepXGetDeviceModifierMapping (client, size, rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); - WriteToClient(client, size, (char *)rep); + WriteToClient(client, size, rep); } diff --git a/nx-X11/programs/Xserver/Xi/getprop.c b/nx-X11/programs/Xserver/Xi/getprop.c index 824fae921..a19824155 100644 --- a/nx-X11/programs/Xserver/Xi/getprop.c +++ b/nx-X11/programs/Xserver/Xi/getprop.c @@ -207,5 +207,5 @@ SRepXGetDeviceDontPropagateList (client, size, rep) swaps(&rep->sequenceNumber); swapl(&rep->length); swaps(&rep->count); - WriteToClient(client, size, (char *)rep); + WriteToClient(client, size, rep); } diff --git a/nx-X11/programs/Xserver/Xi/getselev.c b/nx-X11/programs/Xserver/Xi/getselev.c index 4fafef982..7e1f42af2 100644 --- a/nx-X11/programs/Xserver/Xi/getselev.c +++ b/nx-X11/programs/Xserver/Xi/getselev.c @@ -188,5 +188,5 @@ SRepXGetSelectedExtensionEvents (client, size, rep) swapl(&rep->length); swaps(&rep->this_client_count); swaps(&rep->all_clients_count); - WriteToClient(client, size, (char *)rep); + WriteToClient(client, size, rep); } diff --git a/nx-X11/programs/Xserver/Xi/getvers.c b/nx-X11/programs/Xserver/Xi/getvers.c index 34f4b0948..3a33d207b 100644 --- a/nx-X11/programs/Xserver/Xi/getvers.c +++ b/nx-X11/programs/Xserver/Xi/getvers.c @@ -150,5 +150,5 @@ SRepXGetExtensionVersion (client, size, rep) swapl(&rep->length); swaps(&rep->major_version); swaps(&rep->minor_version); - WriteToClient(client, size, (char *)rep); + WriteToClient(client, size, rep); } diff --git a/nx-X11/programs/Xserver/Xi/grabdev.c b/nx-X11/programs/Xserver/Xi/grabdev.c index bd085a660..07099bc63 100644 --- a/nx-X11/programs/Xserver/Xi/grabdev.c +++ b/nx-X11/programs/Xserver/Xi/grabdev.c @@ -221,5 +221,5 @@ SRepXGrabDevice (client, size, rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); - WriteToClient(client, size, (char *)rep); + WriteToClient(client, size, rep); } diff --git a/nx-X11/programs/Xserver/Xi/gtmotion.c b/nx-X11/programs/Xserver/Xi/gtmotion.c index 9f1ce2fc0..3cc72c7ea 100644 --- a/nx-X11/programs/Xserver/Xi/gtmotion.c +++ b/nx-X11/programs/Xserver/Xi/gtmotion.c @@ -180,7 +180,7 @@ ProcXGetDeviceMotionEvents(client) bufptr++; } } - WriteToClient(client, length * 4, (char *)coords); + WriteToClient(client, length * 4, coords); } if (coords) DEALLOCATE_LOCAL(coords); @@ -203,5 +203,5 @@ SRepXGetDeviceMotionEvents (client, size, rep) swaps(&rep->sequenceNumber); swapl(&rep->length); swapl(&rep->nEvents); - WriteToClient(client, size, (char *)rep); + WriteToClient(client, size, rep); } diff --git a/nx-X11/programs/Xserver/Xi/listdev.c b/nx-X11/programs/Xserver/Xi/listdev.c index ad11652b9..0bf09c7c3 100644 --- a/nx-X11/programs/Xserver/Xi/listdev.c +++ b/nx-X11/programs/Xserver/Xi/listdev.c @@ -396,5 +396,5 @@ SRepXListInputDevices (client, size, rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); - WriteToClient(client, size, (char *)rep); + WriteToClient(client, size, rep); } diff --git a/nx-X11/programs/Xserver/Xi/opendev.c b/nx-X11/programs/Xserver/Xi/opendev.c index 73eba526c..0be0b36c5 100644 --- a/nx-X11/programs/Xserver/Xi/opendev.c +++ b/nx-X11/programs/Xserver/Xi/opendev.c @@ -179,7 +179,7 @@ ProcXOpenDevice(client) rep.length = (j * sizeof (xInputClassInfo) + 3) >> 2; rep.num_classes = j; WriteReplyToClient (client, sizeof (xOpenDeviceReply), &rep); - WriteToClient(client, j * sizeof (xInputClassInfo), (char *)evbase); + WriteToClient(client, j * sizeof (xInputClassInfo), evbase); return (Success); } @@ -198,5 +198,5 @@ SRepXOpenDevice (client, size, rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); - WriteToClient(client, size, (char *)rep); + WriteToClient(client, size, rep); } diff --git a/nx-X11/programs/Xserver/Xi/queryst.c b/nx-X11/programs/Xserver/Xi/queryst.c index 237c263dc..d26b25be9 100644 --- a/nx-X11/programs/Xserver/Xi/queryst.c +++ b/nx-X11/programs/Xserver/Xi/queryst.c @@ -206,5 +206,5 @@ SRepXQueryDeviceState (client, size, rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); - WriteToClient(client, size, (char *)rep); + WriteToClient(client, size, rep); } diff --git a/nx-X11/programs/Xserver/Xi/setbmap.c b/nx-X11/programs/Xserver/Xi/setbmap.c index 2919f48f1..050a14ad3 100644 --- a/nx-X11/programs/Xserver/Xi/setbmap.c +++ b/nx-X11/programs/Xserver/Xi/setbmap.c @@ -162,5 +162,5 @@ SRepXSetDeviceButtonMapping (client, size, rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); - WriteToClient(client, size, (char *)rep); + WriteToClient(client, size, rep); } diff --git a/nx-X11/programs/Xserver/Xi/setdval.c b/nx-X11/programs/Xserver/Xi/setdval.c index c4613dd37..f59577ac3 100644 --- a/nx-X11/programs/Xserver/Xi/setdval.c +++ b/nx-X11/programs/Xserver/Xi/setdval.c @@ -166,5 +166,5 @@ SRepXSetDeviceValuators (client, size, rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); - WriteToClient(client, size, (char *)rep); + WriteToClient(client, size, rep); } diff --git a/nx-X11/programs/Xserver/Xi/setmmap.c b/nx-X11/programs/Xserver/Xi/setmmap.c index c2e7beb4a..7fa5d25f9 100644 --- a/nx-X11/programs/Xserver/Xi/setmmap.c +++ b/nx-X11/programs/Xserver/Xi/setmmap.c @@ -155,6 +155,6 @@ SRepXSetDeviceModifierMapping (client, size, rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); - WriteToClient(client, size, (char *)rep); + WriteToClient(client, size, rep); } diff --git a/nx-X11/programs/Xserver/Xi/setmode.c b/nx-X11/programs/Xserver/Xi/setmode.c index 4314d6465..ea6e0826f 100644 --- a/nx-X11/programs/Xserver/Xi/setmode.c +++ b/nx-X11/programs/Xserver/Xi/setmode.c @@ -150,5 +150,5 @@ SRepXSetDeviceMode (client, size, rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); - WriteToClient(client, size, (char *)rep); + WriteToClient(client, size, rep); } |