From 789d64e19a3b3d98b88bc80f677e0c37bfb5c631 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sun, 13 May 2012 00:03:35 -0700 Subject: 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 Reviewed-by: Keith Packard Tested-by: Daniel Stone --- Xext/shape.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Xext/shape.c') diff --git a/Xext/shape.c b/Xext/shape.c index cc5214a1b..7724e7bb2 100644 --- a/Xext/shape.c +++ b/Xext/shape.c @@ -219,7 +219,7 @@ ProcShapeQueryVersion(ClientPtr client) swaps(&rep.majorVersion); swaps(&rep.minorVersion); } - WriteToClient(client, sizeof(xShapeQueryVersionReply), (char *) &rep); + WriteToClient(client, sizeof(xShapeQueryVersionReply), &rep); return Success; } @@ -679,7 +679,7 @@ ProcShapeQueryExtents(ClientPtr client) swaps(&rep.widthClipShape); swaps(&rep.heightClipShape); } - WriteToClient(client, sizeof(xShapeQueryExtentsReply), (char *) &rep); + WriteToClient(client, sizeof(xShapeQueryExtentsReply), &rep); return Success; } @@ -928,7 +928,7 @@ ProcShapeInputSelected(ClientPtr client) swaps(&rep.sequenceNumber); swapl(&rep.length); } - WriteToClient(client, sizeof(xShapeInputSelectedReply), (char *) &rep); + WriteToClient(client, sizeof(xShapeInputSelectedReply), &rep); return Success; } @@ -1012,8 +1012,8 @@ ProcShapeGetRectangles(ClientPtr client) swapl(&rep.nrects); SwapShorts((short *) rects, (unsigned long) nrects * 4); } - WriteToClient(client, sizeof(rep), (char *) &rep); - WriteToClient(client, nrects * sizeof(xRectangle), (char *) rects); + WriteToClient(client, sizeof(rep), &rep); + WriteToClient(client, nrects * sizeof(xRectangle), rects); free(rects); return Success; } -- cgit v1.2.3