summaryrefslogtreecommitdiff
path: root/Xext
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2012-05-13 00:03:35 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2012-07-09 19:12:56 -0700
commit789d64e19a3b3d98b88bc80f677e0c37bfb5c631 (patch)
tree40f01917cef8f4b645bda7f95aa2c769225d2a4a /Xext
parent329db3292223cccd4887062956622285c45a1523 (diff)
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>
Diffstat (limited to 'Xext')
-rw-r--r--Xext/bigreq.c2
-rw-r--r--Xext/dpms.c8
-rw-r--r--Xext/geext.c2
-rw-r--r--Xext/panoramiX.c14
-rw-r--r--Xext/panoramiXprocs.c5
-rw-r--r--Xext/saver.c4
-rw-r--r--Xext/security.c6
-rw-r--r--Xext/shape.c10
-rw-r--r--Xext/shm.c6
-rw-r--r--Xext/sync.c14
-rw-r--r--Xext/xcmisc.c6
-rw-r--r--Xext/xf86bigfont.c5
-rw-r--r--Xext/xres.c18
-rw-r--r--Xext/xselinux_ext.c8
-rw-r--r--Xext/xtest.c4
-rw-r--r--Xext/xvdisp.c58
-rw-r--r--Xext/xvmc.c24
17 files changed, 94 insertions, 100 deletions
diff --git a/Xext/bigreq.c b/Xext/bigreq.c
index 49355c4a4..9bb1c8616 100644
--- a/Xext/bigreq.c
+++ b/Xext/bigreq.c
@@ -64,7 +64,7 @@ ProcBigReqDispatch(ClientPtr client)
swaps(&rep.sequenceNumber);
swapl(&rep.max_request_size);
}
- WriteToClient(client, sizeof(xBigReqEnableReply), (char *) &rep);
+ WriteToClient(client, sizeof(xBigReqEnableReply), &rep);
return Success;
}
diff --git a/Xext/dpms.c b/Xext/dpms.c
index 348c87289..35be966c6 100644
--- a/Xext/dpms.c
+++ b/Xext/dpms.c
@@ -59,7 +59,7 @@ ProcDPMSGetVersion(ClientPtr client)
swaps(&rep.majorVersion);
swaps(&rep.minorVersion);
}
- WriteToClient(client, sizeof(xDPMSGetVersionReply), (char *) &rep);
+ WriteToClient(client, sizeof(xDPMSGetVersionReply), &rep);
return Success;
}
@@ -79,7 +79,7 @@ ProcDPMSCapable(ClientPtr client)
if (client->swapped) {
swaps(&rep.sequenceNumber);
}
- WriteToClient(client, sizeof(xDPMSCapableReply), (char *) &rep);
+ WriteToClient(client, sizeof(xDPMSCapableReply), &rep);
return Success;
}
@@ -104,7 +104,7 @@ ProcDPMSGetTimeouts(ClientPtr client)
swaps(&rep.suspend);
swaps(&rep.off);
}
- WriteToClient(client, sizeof(xDPMSGetTimeoutsReply), (char *) &rep);
+ WriteToClient(client, sizeof(xDPMSGetTimeoutsReply), &rep);
return Success;
}
@@ -202,7 +202,7 @@ ProcDPMSInfo(ClientPtr client)
swaps(&rep.sequenceNumber);
swaps(&rep.power_level);
}
- WriteToClient(client, sizeof(xDPMSInfoReply), (char *) &rep);
+ WriteToClient(client, sizeof(xDPMSInfoReply), &rep);
return Success;
}
diff --git a/Xext/geext.c b/Xext/geext.c
index 07028238e..7bdd873c6 100644
--- a/Xext/geext.c
+++ b/Xext/geext.c
@@ -85,7 +85,7 @@ ProcGEQueryVersion(ClientPtr client)
swaps(&rep.minorVersion);
}
- WriteToClient(client, sizeof(xGEQueryVersionReply), (char *) &rep);
+ WriteToClient(client, sizeof(xGEQueryVersionReply), &rep);
return Success;
}
diff --git a/Xext/panoramiX.c b/Xext/panoramiX.c
index de62a35e7..98c612a33 100644
--- a/Xext/panoramiX.c
+++ b/Xext/panoramiX.c
@@ -918,7 +918,7 @@ ProcPanoramiXQueryVersion(ClientPtr client)
swaps(&rep.majorVersion);
swaps(&rep.minorVersion);
}
- WriteToClient(client, sizeof(xPanoramiXQueryVersionReply), (char *) &rep);
+ WriteToClient(client, sizeof(xPanoramiXQueryVersionReply), &rep);
return Success;
}
@@ -945,7 +945,7 @@ ProcPanoramiXGetState(ClientPtr client)
swapl(&rep.length);
swapl(&rep.window);
}
- WriteToClient(client, sizeof(xPanoramiXGetStateReply), (char *) &rep);
+ WriteToClient(client, sizeof(xPanoramiXGetStateReply), &rep);
return Success;
}
@@ -973,7 +973,7 @@ ProcPanoramiXGetScreenCount(ClientPtr client)
swapl(&rep.length);
swapl(&rep.window);
}
- WriteToClient(client, sizeof(xPanoramiXGetScreenCountReply), (char *) &rep);
+ WriteToClient(client, sizeof(xPanoramiXGetScreenCountReply), &rep);
return Success;
}
@@ -1009,7 +1009,7 @@ ProcPanoramiXGetScreenSize(ClientPtr client)
swapl(&rep.window);
swapl(&rep.screen);
}
- WriteToClient(client, sizeof(xPanoramiXGetScreenSizeReply), (char *) &rep);
+ WriteToClient(client, sizeof(xPanoramiXGetScreenSizeReply), &rep);
return Success;
}
@@ -1038,7 +1038,7 @@ ProcXineramaIsActive(ClientPtr client)
swapl(&rep.length);
swapl(&rep.state);
}
- WriteToClient(client, sizeof(xXineramaIsActiveReply), (char *) &rep);
+ WriteToClient(client, sizeof(xXineramaIsActiveReply), &rep);
return Success;
}
@@ -1059,7 +1059,7 @@ ProcXineramaQueryScreens(ClientPtr client)
swapl(&rep.length);
swapl(&rep.number);
}
- WriteToClient(client, sizeof(xXineramaQueryScreensReply), (char *) &rep);
+ WriteToClient(client, sizeof(xXineramaQueryScreensReply), &rep);
if (!noPanoramiXExtension) {
xXineramaScreenInfo scratch;
@@ -1077,7 +1077,7 @@ ProcXineramaQueryScreens(ClientPtr client)
swaps(&scratch.width);
swaps(&scratch.height);
}
- WriteToClient(client, sz_XineramaScreenInfo, (char *) &scratch);
+ WriteToClient(client, sz_XineramaScreenInfo, &scratch);
}
}
diff --git a/Xext/panoramiXprocs.c b/Xext/panoramiXprocs.c
index 12d6163bb..bdabfbf03 100644
--- a/Xext/panoramiXprocs.c
+++ b/Xext/panoramiXprocs.c
@@ -2003,7 +2003,7 @@ PanoramiXGetImage(ClientPtr client)
format, planemask, pBuf, widthBytesLine,
isRoot);
- (void) WriteToClient(client, (int) (nlines * widthBytesLine), pBuf);
+ WriteToClient(client, (int) (nlines * widthBytesLine), pBuf);
linesDone += nlines;
}
}
@@ -2020,8 +2020,7 @@ PanoramiXGetImage(ClientPtr client)
nlines, format, plane, pBuf,
widthBytesLine, isRoot);
- (void) WriteToClient(client,
- (int) (nlines * widthBytesLine), pBuf);
+ WriteToClient(client, (int)(nlines * widthBytesLine), pBuf);
linesDone += nlines;
}
diff --git a/Xext/saver.c b/Xext/saver.c
index 61fc044d7..60c02fffa 100644
--- a/Xext/saver.c
+++ b/Xext/saver.c
@@ -646,7 +646,7 @@ ProcScreenSaverQueryVersion(ClientPtr client)
swaps(&rep.sequenceNumber);
swapl(&rep.length);
}
- WriteToClient(client, sizeof(xScreenSaverQueryVersionReply), (char *) &rep);
+ WriteToClient(client, sizeof(xScreenSaverQueryVersionReply), &rep);
return Success;
}
@@ -717,7 +717,7 @@ ProcScreenSaverQueryInfo(ClientPtr client)
swapl(&rep.idle);
swapl(&rep.eventMask);
}
- WriteToClient(client, sizeof(xScreenSaverQueryInfoReply), (char *) &rep);
+ WriteToClient(client, sizeof(xScreenSaverQueryInfoReply), &rep);
return Success;
}
diff --git a/Xext/security.c b/Xext/security.c
index 3699510d3..fd63571b9 100644
--- a/Xext/security.c
+++ b/Xext/security.c
@@ -351,8 +351,7 @@ ProcSecurityQueryVersion(ClientPtr client)
swaps(&rep.majorVersion);
swaps(&rep.minorVersion);
}
- (void) WriteToClient(client, SIZEOF(xSecurityQueryVersionReply),
- (char *) &rep);
+ WriteToClient(client, SIZEOF(xSecurityQueryVersionReply), &rep);
return Success;
} /* ProcSecurityQueryVersion */
@@ -541,8 +540,7 @@ ProcSecurityGenerateAuthorization(ClientPtr client)
swaps(&rep.dataLength);
}
- WriteToClient(client, SIZEOF(xSecurityGenerateAuthorizationReply),
- (char *) &rep);
+ WriteToClient(client, SIZEOF(xSecurityGenerateAuthorizationReply), &rep);
WriteToClient(client, authdata_len, pAuthdata);
SecurityAudit
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;
}
diff --git a/Xext/shm.c b/Xext/shm.c
index e9c4a4e06..1cdb4017d 100644
--- a/Xext/shm.c
+++ b/Xext/shm.c
@@ -306,7 +306,7 @@ ProcShmQueryVersion(ClientPtr client)
swaps(&rep.uid);
swaps(&rep.gid);
}
- WriteToClient(client, sizeof(xShmQueryVersionReply), (char *) &rep);
+ WriteToClient(client, sizeof(xShmQueryVersionReply), &rep);
return Success;
}
@@ -702,7 +702,7 @@ ProcShmGetImage(ClientPtr client)
swapl(&xgi.visual);
swapl(&xgi.size);
}
- WriteToClient(client, sizeof(xShmGetImageReply), (char *) &xgi);
+ WriteToClient(client, sizeof(xShmGetImageReply), &xgi);
return Success;
}
@@ -877,7 +877,7 @@ ProcPanoramiXShmGetImage(ClientPtr client)
swapl(&xgi.visual);
swapl(&xgi.size);
}
- WriteToClient(client, sizeof(xShmGetImageReply), (char *) &xgi);
+ WriteToClient(client, sizeof(xShmGetImageReply), &xgi);
return Success;
}
diff --git a/Xext/sync.c b/Xext/sync.c
index 91968e498..532bbf942 100644
--- a/Xext/sync.c
+++ b/Xext/sync.c
@@ -1198,7 +1198,7 @@ ProcSyncInitialize(ClientPtr client)
if (client->swapped) {
swaps(&rep.sequenceNumber);
}
- WriteToClient(client, sizeof(rep), (char *) &rep);
+ WriteToClient(client, sizeof(rep), &rep);
return Success;
}
@@ -1263,9 +1263,9 @@ ProcSyncListSystemCounters(ClientPtr client)
namelen));
}
- WriteToClient(client, sizeof(rep), (char *) &rep);
+ WriteToClient(client, sizeof(rep), &rep);
if (len) {
- WriteToClient(client, len, (char *) list);
+ WriteToClient(client, len, list);
free(list);
}
@@ -1338,7 +1338,7 @@ ProcSyncGetPriority(ClientPtr client)
swapl(&rep.priority);
}
- WriteToClient(client, sizeof(xSyncGetPriorityReply), (char *) &rep);
+ WriteToClient(client, sizeof(xSyncGetPriorityReply), &rep);
return Success;
}
@@ -1624,7 +1624,7 @@ ProcSyncQueryCounter(ClientPtr client)
swapl(&rep.value_hi);
swapl(&rep.value_lo);
}
- WriteToClient(client, sizeof(xSyncQueryCounterReply), (char *) &rep);
+ WriteToClient(client, sizeof(xSyncQueryCounterReply), &rep);
return Success;
}
@@ -1809,7 +1809,7 @@ ProcSyncQueryAlarm(ClientPtr client)
swapl(&rep.delta_lo);
}
- WriteToClient(client, sizeof(xSyncQueryAlarmReply), (char *) &rep);
+ WriteToClient(client, sizeof(xSyncQueryAlarmReply), &rep);
return Success;
}
@@ -1966,7 +1966,7 @@ ProcSyncQueryFence(ClientPtr client)
swapl(&rep.length);
}
- WriteToClient(client, sizeof(xSyncQueryFenceReply), (char *) &rep);
+ WriteToClient(client, sizeof(xSyncQueryFenceReply), &rep);
return client->noClientException;
}
diff --git a/Xext/xcmisc.c b/Xext/xcmisc.c
index 99a6ece43..943b424c0 100644
--- a/Xext/xcmisc.c
+++ b/Xext/xcmisc.c
@@ -58,7 +58,7 @@ ProcXCMiscGetVersion(ClientPtr client)
swaps(&rep.majorVersion);
swaps(&rep.minorVersion);
}
- WriteToClient(client, sizeof(xXCMiscGetVersionReply), (char *) &rep);
+ WriteToClient(client, sizeof(xXCMiscGetVersionReply), &rep);
return Success;
}
@@ -80,7 +80,7 @@ ProcXCMiscGetXIDRange(ClientPtr client)
swapl(&rep.start_id);
swapl(&rep.count);
}
- WriteToClient(client, sizeof(xXCMiscGetXIDRangeReply), (char *) &rep);
+ WriteToClient(client, sizeof(xXCMiscGetXIDRangeReply), &rep);
return Success;
}
@@ -111,7 +111,7 @@ ProcXCMiscGetXIDList(ClientPtr client)
swapl(&rep.length);
swapl(&rep.count);
}
- WriteToClient(client, sizeof(xXCMiscGetXIDListReply), (char *) &rep);
+ WriteToClient(client, sizeof(xXCMiscGetXIDListReply), &rep);
if (count) {
client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write;
WriteSwappedDataToClient(client, count * sizeof(XID), pids);
diff --git a/Xext/xf86bigfont.c b/Xext/xf86bigfont.c
index 9de785678..3a1e1b288 100644
--- a/Xext/xf86bigfont.c
+++ b/Xext/xf86bigfont.c
@@ -307,8 +307,7 @@ ProcXF86BigfontQueryVersion(ClientPtr client)
swapl(&reply.gid);
swapl(&reply.signature);
}
- WriteToClient(client,
- sizeof(xXF86BigfontQueryVersionReply), (char *) &reply);
+ WriteToClient(client, sizeof(xXF86BigfontQueryVersionReply), &reply);
return Success;
}
@@ -644,7 +643,7 @@ ProcXF86BigfontQueryFont(ClientPtr client)
}
}
}
- WriteToClient(client, rlength, (char *) reply);
+ WriteToClient(client, rlength, reply);
free(reply);
if (nCharInfos > 0) {
if (shmid == -1)
diff --git a/Xext/xres.c b/Xext/xres.c
index dbefeebdb..d207dceb0 100644
--- a/Xext/xres.c
+++ b/Xext/xres.c
@@ -209,7 +209,7 @@ ProcXResQueryVersion(ClientPtr client)
swaps(&rep.server_major);
swaps(&rep.server_minor);
}
- WriteToClient(client, sizeof(xXResQueryVersionReply), (char *) &rep);
+ WriteToClient(client, sizeof(xXResQueryVersionReply), &rep);
return Success;
}
@@ -242,7 +242,7 @@ ProcXResQueryClients(ClientPtr client)
swapl(&rep.length);
swapl(&rep.num_clients);
}
- WriteToClient(client, sizeof(xXResQueryClientsReply), (char *) &rep);
+ WriteToClient(client, sizeof(xXResQueryClientsReply), &rep);
if (num_clients) {
xXResClient scratch;
@@ -255,7 +255,7 @@ ProcXResQueryClients(ClientPtr client)
swapl(&scratch.resource_base);
swapl(&scratch.resource_mask);
}
- WriteToClient(client, sz_xXResClient, (char *) &scratch);
+ WriteToClient(client, sz_xXResClient, &scratch);
}
}
@@ -310,8 +310,7 @@ ProcXResQueryClientResources(ClientPtr client)
swapl(&rep.num_types);
}
- WriteToClient(client, sizeof(xXResQueryClientResourcesReply),
- (char *) &rep);
+ WriteToClient(client, sizeof(xXResQueryClientResourcesReply), &rep);
if (num_types) {
xXResType scratch;
@@ -337,7 +336,7 @@ ProcXResQueryClientResources(ClientPtr client)
swapl(&scratch.resource_type);
swapl(&scratch.count);
}
- WriteToClient(client, sz_xXResType, (char *) &scratch);
+ WriteToClient(client, sz_xXResType, &scratch);
}
}
@@ -486,8 +485,7 @@ ProcXResQueryClientPixmapBytes(ClientPtr client)
swapl(&rep.bytes);
swapl(&rep.bytes_overflow);
}
- WriteToClient(client, sizeof(xXResQueryClientPixmapBytesReply),
- (char *) &rep);
+ WriteToClient(client, sizeof(xXResQueryClientPixmapBytesReply), &rep);
return Success;
}
@@ -679,7 +677,7 @@ ProcXResQueryClientIds (ClientPtr client)
swapl (&rep.numIds);
}
- WriteToClient(client,sizeof(rep),(char*)&rep);
+ WriteToClient(client, sizeof(rep), &rep);
WriteFragmentsToClient(client, &ctx.response);
}
@@ -1061,7 +1059,7 @@ ProcXResQueryResourceBytes (ClientPtr client)
SwapXResQueryResourceBytes(&ctx.response);
}
- WriteToClient(client,sizeof(rep),(char*)&rep);
+ WriteToClient(client, sizeof(rep), &rep);
WriteFragmentsToClient(client, &ctx.response);
}
diff --git a/Xext/xselinux_ext.c b/Xext/xselinux_ext.c
index 342abb1a6..881759137 100644
--- a/Xext/xselinux_ext.c
+++ b/Xext/xselinux_ext.c
@@ -76,7 +76,7 @@ ProcSELinuxQueryVersion(ClientPtr client)
swaps(&rep.server_major);
swaps(&rep.server_minor);
}
- WriteToClient(client, sizeof(rep), (char *) &rep);
+ WriteToClient(client, sizeof(rep), &rep);
return Success;
}
@@ -104,7 +104,7 @@ SELinuxSendContextReply(ClientPtr client, security_id_t sid)
swapl(&rep.context_len);
}
- WriteToClient(client, sizeof(SELinuxGetContextReply), (char *) &rep);
+ WriteToClient(client, sizeof(SELinuxGetContextReply), &rep);
WriteToClient(client, len, ctx);
freecon(ctx);
return Success;
@@ -383,8 +383,8 @@ SELinuxSendItemsToClient(ClientPtr client, SELinuxListItemRec * items,
swapl(&rep.count);
}
- WriteToClient(client, sizeof(SELinuxListItemsReply), (char *) &rep);
- WriteToClient(client, size * 4, (char *) buf);
+ WriteToClient(client, sizeof(SELinuxListItemsReply), &rep);
+ WriteToClient(client, size * 4, buf);
/* Free stuff and return */
rc = Success;
diff --git a/Xext/xtest.c b/Xext/xtest.c
index e659b4154..6112c0b7d 100644
--- a/Xext/xtest.c
+++ b/Xext/xtest.c
@@ -100,7 +100,7 @@ ProcXTestGetVersion(ClientPtr client)
swaps(&rep.sequenceNumber);
swaps(&rep.minorVersion);
}
- WriteToClient(client, sizeof(xXTestGetVersionReply), (char *) &rep);
+ WriteToClient(client, sizeof(xXTestGetVersionReply), &rep);
return Success;
}
@@ -141,7 +141,7 @@ ProcXTestCompareCursor(ClientPtr client)
if (client->swapped) {
swaps(&rep.sequenceNumber);
}
- WriteToClient(client, sizeof(xXTestCompareCursorReply), (char *) &rep);
+ WriteToClient(client, sizeof(xXTestCompareCursorReply), &rep);
return Success;
}
diff --git a/Xext/xvdisp.c b/Xext/xvdisp.c
index 8abd51c11..87302673b 100644
--- a/Xext/xvdisp.c
+++ b/Xext/xvdisp.c
@@ -62,7 +62,7 @@ SWriteQueryExtensionReply(ClientPtr client, xvQueryExtensionReply * rep)
swaps(&rep->version);
swaps(&rep->revision);
- (void) WriteToClient(client, sz_xvQueryExtensionReply, (char *) rep);
+ WriteToClient(client, sz_xvQueryExtensionReply, rep);
return Success;
}
@@ -74,7 +74,7 @@ SWriteQueryAdaptorsReply(ClientPtr client, xvQueryAdaptorsReply * rep)
swapl(&rep->length);
swaps(&rep->num_adaptors);
- (void) WriteToClient(client, sz_xvQueryAdaptorsReply, (char *) rep);
+ WriteToClient(client, sz_xvQueryAdaptorsReply, rep);
return Success;
}
@@ -86,7 +86,7 @@ SWriteQueryEncodingsReply(ClientPtr client, xvQueryEncodingsReply * rep)
swapl(&rep->length);
swaps(&rep->num_encodings);
- (void) WriteToClient(client, sz_xvQueryEncodingsReply, (char *) rep);
+ WriteToClient(client, sz_xvQueryEncodingsReply, rep);
return Success;
}
@@ -99,7 +99,7 @@ SWriteAdaptorInfo(ClientPtr client, xvAdaptorInfo * pAdaptor)
swaps(&pAdaptor->num_ports);
swaps(&pAdaptor->num_formats);
- (void) WriteToClient(client, sz_xvAdaptorInfo, (char *) pAdaptor);
+ WriteToClient(client, sz_xvAdaptorInfo, pAdaptor);
return Success;
}
@@ -114,7 +114,7 @@ SWriteEncodingInfo(ClientPtr client, xvEncodingInfo * pEncoding)
swaps(&pEncoding->height);
swapl(&pEncoding->rate.numerator);
swapl(&pEncoding->rate.denominator);
- (void) WriteToClient(client, sz_xvEncodingInfo, (char *) pEncoding);
+ WriteToClient(client, sz_xvEncodingInfo, pEncoding);
return Success;
}
@@ -123,7 +123,7 @@ static int
SWriteFormat(ClientPtr client, xvFormat * pFormat)
{
swapl(&pFormat->visual);
- (void) WriteToClient(client, sz_xvFormat, (char *) pFormat);
+ WriteToClient(client, sz_xvFormat, pFormat);
return Success;
}
@@ -135,7 +135,7 @@ SWriteAttributeInfo(ClientPtr client, xvAttributeInfo * pAtt)
swapl(&pAtt->size);
swapl(&pAtt->min);
swapl(&pAtt->max);
- (void) WriteToClient(client, sz_xvAttributeInfo, (char *) pAtt);
+ WriteToClient(client, sz_xvAttributeInfo, pAtt);
return Success;
}
@@ -157,7 +157,7 @@ SWriteImageFormatInfo(ClientPtr client, xvImageFormatInfo * pImage)
swapl(&pImage->vert_u_period);
swapl(&pImage->vert_v_period);
- (void) WriteToClient(client, sz_xvImageFormatInfo, (char *) pImage);
+ WriteToClient(client, sz_xvImageFormatInfo, pImage);
return Success;
}
@@ -168,7 +168,7 @@ SWriteGrabPortReply(ClientPtr client, xvGrabPortReply * rep)
swaps(&rep->sequenceNumber);
swapl(&rep->length);
- (void) WriteToClient(client, sz_xvGrabPortReply, (char *) rep);
+ WriteToClient(client, sz_xvGrabPortReply, rep);
return Success;
}
@@ -180,7 +180,7 @@ SWriteGetPortAttributeReply(ClientPtr client, xvGetPortAttributeReply * rep)
swapl(&rep->length);
swapl(&rep->value);
- (void) WriteToClient(client, sz_xvGetPortAttributeReply, (char *) rep);
+ WriteToClient(client, sz_xvGetPortAttributeReply, rep);
return Success;
}
@@ -193,7 +193,7 @@ SWriteQueryBestSizeReply(ClientPtr client, xvQueryBestSizeReply * rep)
swaps(&rep->actual_width);
swaps(&rep->actual_height);
- (void) WriteToClient(client, sz_xvQueryBestSizeReply, (char *) rep);
+ WriteToClient(client, sz_xvQueryBestSizeReply, rep);
return Success;
}
@@ -207,7 +207,7 @@ SWriteQueryPortAttributesReply(ClientPtr client,
swapl(&rep->num_attributes);
swapl(&rep->text_size);
- (void) WriteToClient(client, sz_xvQueryPortAttributesReply, (char *) rep);
+ WriteToClient(client, sz_xvQueryPortAttributesReply, rep);
return Success;
}
@@ -223,7 +223,7 @@ SWriteQueryImageAttributesReply(ClientPtr client,
swaps(&rep->width);
swaps(&rep->height);
- (void) WriteToClient(client, sz_xvQueryImageAttributesReply, (char *) rep);
+ WriteToClient(client, sz_xvQueryImageAttributesReply, rep);
return Success;
}
@@ -235,66 +235,66 @@ SWriteListImageFormatsReply(ClientPtr client, xvListImageFormatsReply * rep)
swapl(&rep->length);
swapl(&rep->num_formats);
- (void) WriteToClient(client, sz_xvListImageFormatsReply, (char *) rep);
+ WriteToClient(client, sz_xvListImageFormatsReply, rep);
return Success;
}
#define _WriteQueryAdaptorsReply(_c,_d) \
if ((_c)->swapped) SWriteQueryAdaptorsReply(_c, _d); \
- else WriteToClient(_c, sz_xvQueryAdaptorsReply, (char*)_d)
+ else WriteToClient(_c, sz_xvQueryAdaptorsReply, _d)
#define _WriteQueryExtensionReply(_c,_d) \
if ((_c)->swapped) SWriteQueryExtensionReply(_c, _d); \
- else WriteToClient(_c, sz_xvQueryExtensionReply, (char*)_d)
+ else WriteToClient(_c, sz_xvQueryExtensionReply, _d)
#define _WriteQueryEncodingsReply(_c,_d) \
if ((_c)->swapped) SWriteQueryEncodingsReply(_c, _d); \
- else WriteToClient(_c, sz_xvQueryEncodingsReply, (char*)_d)
+ else WriteToClient(_c, sz_xvQueryEncodingsReply, _d)
#define _WriteAdaptorInfo(_c,_d) \
if ((_c)->swapped) SWriteAdaptorInfo(_c, _d); \
- else WriteToClient(_c, sz_xvAdaptorInfo, (char*)_d)
+ else WriteToClient(_c, sz_xvAdaptorInfo, _d)
#define _WriteAttributeInfo(_c,_d) \
if ((_c)->swapped) SWriteAttributeInfo(_c, _d); \
- else WriteToClient(_c, sz_xvAttributeInfo, (char*)_d)
+ else WriteToClient(_c, sz_xvAttributeInfo, _d)
#define _WriteEncodingInfo(_c,_d) \
if ((_c)->swapped) SWriteEncodingInfo(_c, _d); \
- else WriteToClient(_c, sz_xvEncodingInfo, (char*)_d)
+ else WriteToClient(_c, sz_xvEncodingInfo, _d)
#define _WriteFormat(_c,_d) \
if ((_c)->swapped) SWriteFormat(_c, _d); \
- else WriteToClient(_c, sz_xvFormat, (char*)_d)
+ else WriteToClient(_c, sz_xvFormat, _d)
#define _WriteGrabPortReply(_c,_d) \
if ((_c)->swapped) SWriteGrabPortReply(_c, _d); \
- else WriteToClient(_c, sz_xvGrabPortReply, (char*)_d)
+ else WriteToClient(_c, sz_xvGrabPortReply, _d)
#define _WriteGetPortAttributeReply(_c,_d) \
if ((_c)->swapped) SWriteGetPortAttributeReply(_c, _d); \
- else WriteToClient(_c, sz_xvGetPortAttributeReply, (char*)_d)
+ else WriteToClient(_c, sz_xvGetPortAttributeReply, _d)
#define _WriteQueryBestSizeReply(_c,_d) \
if ((_c)->swapped) SWriteQueryBestSizeReply(_c, _d); \
- else WriteToClient(_c, sz_xvQueryBestSizeReply,(char*) _d)
+ else WriteToClient(_c, sz_xvQueryBestSizeReply, _d)
#define _WriteQueryPortAttributesReply(_c,_d) \
if ((_c)->swapped) SWriteQueryPortAttributesReply(_c, _d); \
- else WriteToClient(_c, sz_xvQueryPortAttributesReply,(char*) _d)
+ else WriteToClient(_c, sz_xvQueryPortAttributesReply, _d)
#define _WriteQueryImageAttributesReply(_c,_d) \
if ((_c)->swapped) SWriteQueryImageAttributesReply(_c, _d); \
- else WriteToClient(_c, sz_xvQueryImageAttributesReply,(char*) _d)
+ else WriteToClient(_c, sz_xvQueryImageAttributesReply, _d)
#define _WriteListImageFormatsReply(_c,_d) \
if ((_c)->swapped) SWriteListImageFormatsReply(_c, _d); \
- else WriteToClient(_c, sz_xvListImageFormatsReply,(char*) _d)
+ else WriteToClient(_c, sz_xvListImageFormatsReply, _d)
#define _WriteImageFormatInfo(_c,_d) \
if ((_c)->swapped) SWriteImageFormatInfo(_c, _d); \
- else WriteToClient(_c, sz_xvImageFormatInfo, (char*)_d)
+ else WriteToClient(_c, sz_xvImageFormatInfo, _d)
#define _AllocatePort(_i,_p) \
((_p)->id != _i) ? (* (_p)->pAdaptor->ddAllocatePort)(_i,_p,&_p) : Success
@@ -1100,7 +1100,7 @@ ProcXvQueryImageAttributes(ClientPtr client)
_WriteQueryImageAttributesReply(client, &rep);
if (client->swapped)
SwapLongs((CARD32 *) offsets, planeLength);
- WriteToClient(client, planeLength << 2, (char *) offsets);
+ WriteToClient(client, planeLength << 2, offsets);
free(offsets);
diff --git a/Xext/xvmc.c b/Xext/xvmc.c
index 4aaff4d9f..b008bfe89 100644
--- a/Xext/xvmc.c
+++ b/Xext/xvmc.c
@@ -118,7 +118,7 @@ ProcXvMCQueryVersion(ClientPtr client)
rep.length = 0;
rep.major = SERVER_XVMC_MAJOR_VERSION;
rep.minor = SERVER_XVMC_MINOR_VERSION;
- WriteToClient(client, sizeof(xvmcQueryVersionReply), (char *) &rep);
+ WriteToClient(client, sizeof(xvmcQueryVersionReply), &rep);
return Success;
}
@@ -156,7 +156,7 @@ ProcXvMCListSurfaceTypes(ClientPtr client)
rep.num = (adaptor) ? adaptor->num_surfaces : 0;
rep.length = bytes_to_int32(rep.num * sizeof(xvmcSurfaceInfo));
- WriteToClient(client, sizeof(xvmcListSurfaceTypesReply), (char *) &rep);
+ WriteToClient(client, sizeof(xvmcListSurfaceTypesReply), &rep);
for (i = 0; i < rep.num; i++) {
surface = adaptor->surfaces[i];
@@ -168,7 +168,7 @@ ProcXvMCListSurfaceTypes(ClientPtr client)
info.subpicture_max_height = surface->subpicture_max_height;
info.mc_type = surface->mc_type;
info.flags = surface->flags;
- WriteToClient(client, sizeof(xvmcSurfaceInfo), (char *) &info);
+ WriteToClient(client, sizeof(xvmcSurfaceInfo), &info);
}
return Success;
@@ -254,9 +254,9 @@ ProcXvMCCreateContext(ClientPtr client)
rep.flags_return = pContext->flags;
rep.length = dwords;
- WriteToClient(client, sizeof(xvmcCreateContextReply), (char *) &rep);
+ WriteToClient(client, sizeof(xvmcCreateContextReply), &rep);
if (dwords)
- WriteToClient(client, dwords << 2, (char *) data);
+ WriteToClient(client, dwords << 2, data);
AddResource(pContext->context_id, XvMCRTContext, pContext);
free(data);
@@ -325,9 +325,9 @@ ProcXvMCCreateSurface(ClientPtr client)
rep.sequenceNumber = client->sequence;
rep.length = dwords;
- WriteToClient(client, sizeof(xvmcCreateSurfaceReply), (char *) &rep);
+ WriteToClient(client, sizeof(xvmcCreateSurfaceReply), &rep);
if (dwords)
- WriteToClient(client, dwords << 2, (char *) data);
+ WriteToClient(client, dwords << 2, data);
AddResource(pSurface->surface_id, XvMCRTSurface, pSurface);
free(data);
@@ -448,9 +448,9 @@ ProcXvMCCreateSubpicture(ClientPtr client)
rep.component_order[3] = pSubpicture->component_order[3];
rep.length = dwords;
- WriteToClient(client, sizeof(xvmcCreateSubpictureReply), (char *) &rep);
+ WriteToClient(client, sizeof(xvmcCreateSubpictureReply), &rep);
if (dwords)
- WriteToClient(client, dwords << 2, (char *) data);
+ WriteToClient(client, dwords << 2, data);
AddResource(pSubpicture->subpicture_id, XvMCRTSubpicture, pSubpicture);
free(data);
@@ -533,7 +533,7 @@ ProcXvMCListSubpictureTypes(ClientPtr client)
rep.length = bytes_to_int32(rep.num * sizeof(xvImageFormatInfo));
- WriteToClient(client, sizeof(xvmcListSubpictureTypesReply), (char *) &rep);
+ WriteToClient(client, sizeof(xvmcListSubpictureTypesReply), &rep);
for (i = 0; i < rep.num; i++) {
pImage = NULL;
@@ -569,7 +569,7 @@ ProcXvMCListSubpictureTypes(ClientPtr client)
info.vert_v_period = pImage->vert_v_period;
memcpy(&info.comp_order, pImage->component_order, 32);
info.scanline_order = pImage->scanline_order;
- WriteToClient(client, sizeof(xvImageFormatInfo), (char *) &info);
+ WriteToClient(client, sizeof(xvImageFormatInfo), &info);
}
return Success;
@@ -634,7 +634,7 @@ ProcXvMCGetDRInfo(ClientPtr client)
}
#endif /* HAS_XVMCSHM */
- WriteToClient(client, sizeof(xvmcGetDRInfoReply), (char *) &rep);
+ WriteToClient(client, sizeof(xvmcGetDRInfoReply), &rep);
if (rep.length) {
WriteToClient(client, rep.nameLen, pScreenPriv->clientDriverName);
WriteToClient(client, rep.busIDLen, pScreenPriv->busID);