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/dix/dispatch.c | |
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/dix/dispatch.c')
-rw-r--r-- | nx-X11/programs/Xserver/dix/dispatch.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/nx-X11/programs/Xserver/dix/dispatch.c b/nx-X11/programs/Xserver/dix/dispatch.c index 826adfb5c..63ea0ab87 100644 --- a/nx-X11/programs/Xserver/dix/dispatch.c +++ b/nx-X11/programs/Xserver/dix/dispatch.c @@ -945,7 +945,7 @@ ProcGetAtomName(register ClientPtr client) reply.sequenceNumber = client->sequence; reply.nameLength = len; WriteReplyToClient(client, sizeof(xGetAtomNameReply), &reply); - (void)WriteToClient(client, len, str); + WriteToClient(client, len, str); return(client->noClientException); } else @@ -2278,7 +2278,7 @@ DoGetImage(register ClientPtr client, int format, Drawable drawable, ClientOrder(client)); /* Don't split me, gcc pukes when you do */ - (void)WriteToClient(client, + WriteToClient(client, (int)(nlines * widthBytesLine), pBuf); } @@ -2322,7 +2322,7 @@ DoGetImage(register ClientPtr client, int format, Drawable drawable, ClientOrder (client)); /* Don't split me, gcc pukes when you do */ - (void)WriteToClient(client, + WriteToClient(client, (int)(nlines * widthBytesLine), pBuf); } @@ -3441,7 +3441,7 @@ ProcGetFontPath(register ClientPtr client) WriteReplyToClient(client, sizeof(xGetFontPathReply), &reply); if (stringLens || numpaths) - (void)WriteToClient(client, stringLens + numpaths, (char *)bufferStart); + WriteToClient(client, stringLens + numpaths, bufferStart); return(client->noClientException); } @@ -3835,8 +3835,8 @@ SendConnSetup(register ClientPtr client, char *reason) if (client->swapped) WriteSConnSetupPrefix(client, &csp); else - (void)WriteToClient(client, sz_xConnSetupPrefix, (char *) &csp); - (void)WriteToClient(client, (int)csp.lengthReason, reason); + WriteToClient(client, sz_xConnSetupPrefix, &csp); + WriteToClient(client, (int)csp.lengthReason, reason); return (client->noClientException = -1); } @@ -3893,9 +3893,9 @@ SendConnSetup(register ClientPtr client, char *reason) } else { - (void)WriteToClient(client, sizeof(xConnSetupPrefix), + WriteToClient(client, sizeof(xConnSetupPrefix), (char *) lconnSetupPrefix); - (void)WriteToClient(client, (int)(lconnSetupPrefix->length << 2), + WriteToClient(client, (int)(lconnSetupPrefix->length << 2), lConnectionInfo); } client->clientState = ClientStateRunning; |