aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/Xext
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2016-07-04 00:28:47 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-07-05 13:32:05 +0200
commitf6a1bda2dff0c70aa13f3cb763a9b08c4c037c53 (patch)
tree13abc7de22c00d7ab9080c47df749afbe94d8f85 /nx-X11/programs/Xserver/Xext
parentff81a52695821704a3eb33e8de8bb7fe55bccfe1 (diff)
downloadnx-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/Xext')
-rw-r--r--nx-X11/programs/Xserver/Xext/bigreq.c2
-rw-r--r--nx-X11/programs/Xserver/Xext/dpms.c8
-rw-r--r--nx-X11/programs/Xserver/Xext/panoramiX.c14
-rw-r--r--nx-X11/programs/Xserver/Xext/panoramiXprocs.c4
-rw-r--r--nx-X11/programs/Xserver/Xext/saver.c4
-rw-r--r--nx-X11/programs/Xserver/Xext/security.c6
-rw-r--r--nx-X11/programs/Xserver/Xext/shape.c10
-rw-r--r--nx-X11/programs/Xserver/Xext/shm.c6
-rw-r--r--nx-X11/programs/Xserver/Xext/sync.c12
-rw-r--r--nx-X11/programs/Xserver/Xext/xcmisc.c6
-rw-r--r--nx-X11/programs/Xserver/Xext/xf86bigfont.c4
-rw-r--r--nx-X11/programs/Xserver/Xext/xres.c12
-rw-r--r--nx-X11/programs/Xserver/Xext/xtest.c4
-rw-r--r--nx-X11/programs/Xserver/Xext/xvdisp.c58
-rw-r--r--nx-X11/programs/Xserver/Xext/xvmc.c24
15 files changed, 87 insertions, 87 deletions
diff --git a/nx-X11/programs/Xserver/Xext/bigreq.c b/nx-X11/programs/Xserver/Xext/bigreq.c
index ec1ece91a..29f638fe1 100644
--- a/nx-X11/programs/Xserver/Xext/bigreq.c
+++ b/nx-X11/programs/Xserver/Xext/bigreq.c
@@ -102,6 +102,6 @@ ProcBigReqDispatch (client)
swaps(&rep.sequenceNumber);
swapl(&rep.max_request_size);
}
- WriteToClient(client, sizeof(xBigReqEnableReply), (char *)&rep);
+ WriteToClient(client, sizeof(xBigReqEnableReply), &rep);
return(client->noClientException);
}
diff --git a/nx-X11/programs/Xserver/Xext/dpms.c b/nx-X11/programs/Xserver/Xext/dpms.c
index eab73ebed..4d3acf03a 100644
--- a/nx-X11/programs/Xserver/Xext/dpms.c
+++ b/nx-X11/programs/Xserver/Xext/dpms.c
@@ -118,7 +118,7 @@ ProcDPMSGetVersion(client)
swaps(&rep.majorVersion);
swaps(&rep.minorVersion);
}
- WriteToClient(client, sizeof(xDPMSGetVersionReply), (char *)&rep);
+ WriteToClient(client, sizeof(xDPMSGetVersionReply), &rep);
return(client->noClientException);
}
@@ -138,7 +138,7 @@ ProcDPMSCapable(register ClientPtr client)
if (client->swapped) {
swaps(&rep.sequenceNumber);
}
- WriteToClient(client, sizeof(xDPMSCapableReply), (char *)&rep);
+ WriteToClient(client, sizeof(xDPMSCapableReply), &rep);
return(client->noClientException);
}
@@ -164,7 +164,7 @@ ProcDPMSGetTimeouts(client)
swaps(&rep.suspend);
swaps(&rep.off);
}
- WriteToClient(client, sizeof(xDPMSGetTimeoutsReply), (char *)&rep);
+ WriteToClient(client, sizeof(xDPMSGetTimeoutsReply), &rep);
return(client->noClientException);
}
@@ -275,7 +275,7 @@ ProcDPMSInfo(register ClientPtr client)
swaps(&rep.sequenceNumber);
swaps(&rep.power_level);
}
- WriteToClient(client, sizeof(xDPMSInfoReply), (char *)&rep);
+ WriteToClient(client, sizeof(xDPMSInfoReply), &rep);
return(client->noClientException);
}
diff --git a/nx-X11/programs/Xserver/Xext/panoramiX.c b/nx-X11/programs/Xserver/Xext/panoramiX.c
index 34d56c3bf..d83f34c2e 100644
--- a/nx-X11/programs/Xserver/Xext/panoramiX.c
+++ b/nx-X11/programs/Xserver/Xext/panoramiX.c
@@ -949,7 +949,7 @@ ProcPanoramiXQueryVersion (ClientPtr client)
swaps(&rep.majorVersion);
swaps(&rep.minorVersion);
}
- WriteToClient(client, sizeof (xPanoramiXQueryVersionReply), (char *)&rep);
+ WriteToClient(client, sizeof (xPanoramiXQueryVersionReply), &rep);
return (client->noClientException);
}
@@ -973,7 +973,7 @@ ProcPanoramiXGetState(ClientPtr client)
swapl (&rep.length);
swapl ((int* )&rep.state);
}
- WriteToClient (client, sizeof (xPanoramiXGetStateReply), (char *) &rep);
+ WriteToClient (client, sizeof (xPanoramiXGetStateReply), &rep);
return client->noClientException;
}
@@ -998,7 +998,7 @@ ProcPanoramiXGetScreenCount(ClientPtr client)
swapl (&rep.length);
swapl ((int* )&rep.ScreenCount);
}
- WriteToClient (client, sizeof (xPanoramiXGetScreenCountReply), (char *) &rep);
+ WriteToClient (client, sizeof (xPanoramiXGetScreenCountReply), &rep);
return client->noClientException;
}
@@ -1025,7 +1025,7 @@ ProcPanoramiXGetScreenSize(ClientPtr client)
swapl (&rep.width);
swapl (&rep.height);
}
- WriteToClient (client, sizeof (xPanoramiXGetScreenSizeReply), (char *) &rep);
+ WriteToClient (client, sizeof (xPanoramiXGetScreenSizeReply), &rep);
return client->noClientException;
}
@@ -1047,7 +1047,7 @@ ProcXineramaIsActive(ClientPtr client)
swapl (&rep.length);
swapl (&rep.state);
}
- WriteToClient (client, sizeof (xXineramaIsActiveReply), (char *) &rep);
+ WriteToClient (client, sizeof (xXineramaIsActiveReply), &rep);
return client->noClientException;
}
@@ -1069,7 +1069,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;
@@ -1087,7 +1087,7 @@ ProcXineramaQueryScreens(ClientPtr client)
swaps (&scratch.width);
swaps (&scratch.height);
}
- WriteToClient (client, sz_XineramaScreenInfo, (char *) &scratch);
+ WriteToClient (client, sz_XineramaScreenInfo, &scratch);
}
}
diff --git a/nx-X11/programs/Xserver/Xext/panoramiXprocs.c b/nx-X11/programs/Xserver/Xext/panoramiXprocs.c
index 36ebfac21..5cc088c98 100644
--- a/nx-X11/programs/Xserver/Xext/panoramiXprocs.c
+++ b/nx-X11/programs/Xserver/Xext/panoramiXprocs.c
@@ -1863,7 +1863,7 @@ int PanoramiXGetImage(ClientPtr client)
XineramaGetImageData(drawables, x, y + linesDone, w, nlines,
format, planemask, pBuf, widthBytesLine, isRoot);
- (void)WriteToClient(client,
+ WriteToClient(client,
(int)(nlines * widthBytesLine),
pBuf);
linesDone += nlines;
@@ -1881,7 +1881,7 @@ int PanoramiXGetImage(ClientPtr client)
nlines, format, plane, pBuf,
widthBytesLine, isRoot);
- (void)WriteToClient(client,
+ WriteToClient(client,
(int)(nlines * widthBytesLine),
pBuf);
diff --git a/nx-X11/programs/Xserver/Xext/saver.c b/nx-X11/programs/Xserver/Xext/saver.c
index ab1096351..7cc186591 100644
--- a/nx-X11/programs/Xserver/Xext/saver.c
+++ b/nx-X11/programs/Xserver/Xext/saver.c
@@ -702,7 +702,7 @@ ProcScreenSaverQueryVersion (client)
swaps(&rep.sequenceNumber);
swapl(&rep.length);
}
- WriteToClient(client, sizeof (xScreenSaverQueryVersionReply), (char *)&rep);
+ WriteToClient(client, sizeof (xScreenSaverQueryVersionReply), &rep);
return (client->noClientException);
}
@@ -774,7 +774,7 @@ ProcScreenSaverQueryInfo (client)
swapl (&rep.idle);
swapl (&rep.eventMask);
}
- WriteToClient(client, sizeof (xScreenSaverQueryInfoReply), (char *)&rep);
+ WriteToClient(client, sizeof (xScreenSaverQueryInfoReply), &rep);
return (client->noClientException);
}
diff --git a/nx-X11/programs/Xserver/Xext/security.c b/nx-X11/programs/Xserver/Xext/security.c
index c7cd3f1fd..c346f8deb 100644
--- a/nx-X11/programs/Xserver/Xext/security.c
+++ b/nx-X11/programs/Xserver/Xext/security.c
@@ -489,8 +489,8 @@ ProcSecurityQueryVersion(
swaps(&rep.majorVersion);
swaps(&rep.minorVersion);
}
- (void)WriteToClient(client, SIZEOF(xSecurityQueryVersionReply),
- (char *)&rep);
+ WriteToClient(client, SIZEOF(xSecurityQueryVersionReply),
+ &rep);
return (client->noClientException);
} /* ProcSecurityQueryVersion */
@@ -709,7 +709,7 @@ ProcSecurityGenerateAuthorization(
}
WriteToClient(client, SIZEOF(xSecurityGenerateAuthorizationReply),
- (char *)&rep);
+ &rep);
WriteToClient(client, authdata_len, pAuthdata);
SecurityAudit("client %d generated authorization %d trust %d timeout %d group %d events %d\n",
diff --git a/nx-X11/programs/Xserver/Xext/shape.c b/nx-X11/programs/Xserver/Xext/shape.c
index a4aa5bece..c90fd8ecd 100644
--- a/nx-X11/programs/Xserver/Xext/shape.c
+++ b/nx-X11/programs/Xserver/Xext/shape.c
@@ -303,7 +303,7 @@ ProcShapeQueryVersion (client)
swaps(&rep.majorVersion);
swaps(&rep.minorVersion);
}
- WriteToClient(client, sizeof (xShapeQueryVersionReply), (char *)&rep);
+ WriteToClient(client, sizeof (xShapeQueryVersionReply), &rep);
return (client->noClientException);
}
@@ -763,7 +763,7 @@ ProcShapeQueryExtents (client)
swaps(&rep.widthClipShape);
swaps(&rep.heightClipShape);
}
- WriteToClient(client, sizeof (xShapeQueryExtentsReply), (char *)&rep);
+ WriteToClient(client, sizeof (xShapeQueryExtentsReply), &rep);
return (client->noClientException);
}
@@ -1016,7 +1016,7 @@ ProcShapeInputSelected (client)
swaps (&rep.sequenceNumber);
swapl (&rep.length);
}
- WriteToClient (client, sizeof (xShapeInputSelectedReply), (char *) &rep);
+ WriteToClient (client, sizeof (xShapeInputSelectedReply), &rep);
return (client->noClientException);
}
@@ -1099,8 +1099,8 @@ ProcShapeGetRectangles (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);
DEALLOCATE_LOCAL (rects);
return client->noClientException;
}
diff --git a/nx-X11/programs/Xserver/Xext/shm.c b/nx-X11/programs/Xserver/Xext/shm.c
index 2f82ebcf6..a39aef630 100644
--- a/nx-X11/programs/Xserver/Xext/shm.c
+++ b/nx-X11/programs/Xserver/Xext/shm.c
@@ -366,7 +366,7 @@ ProcShmQueryVersion(client)
swaps(&rep.uid);
swaps(&rep.gid);
}
- WriteToClient(client, sizeof(xShmQueryVersionReply), (char *)&rep);
+ WriteToClient(client, sizeof(xShmQueryVersionReply), &rep);
return (client->noClientException);
}
@@ -716,7 +716,7 @@ ProcPanoramiXShmGetImage(ClientPtr client)
swapl(&xgi.visual);
swapl(&xgi.size);
}
- WriteToClient(client, sizeof(xShmGetImageReply), (char *)&xgi);
+ WriteToClient(client, sizeof(xShmGetImageReply), &xgi);
return(client->noClientException);
}
@@ -1044,7 +1044,7 @@ ProcShmGetImage(client)
swapl(&xgi.visual);
swapl(&xgi.size);
}
- WriteToClient(client, sizeof(xShmGetImageReply), (char *)&xgi);
+ WriteToClient(client, sizeof(xShmGetImageReply), &xgi);
return(client->noClientException);
}
diff --git a/nx-X11/programs/Xserver/Xext/sync.c b/nx-X11/programs/Xserver/Xext/sync.c
index a137afedd..3dff56d93 100644
--- a/nx-X11/programs/Xserver/Xext/sync.c
+++ b/nx-X11/programs/Xserver/Xext/sync.c
@@ -1349,7 +1349,7 @@ ProcSyncInitialize(client)
{
swaps(&rep.sequenceNumber);
}
- WriteToClient(client, sizeof(rep), (char *) &rep);
+ WriteToClient(client, sizeof(rep), &rep);
return (client->noClientException);
}
@@ -1419,10 +1419,10 @@ ProcSyncListSystemCounters(client)
((sz_xSyncSystemCounter + namelen + 3) & ~3));
}
- WriteToClient(client, sizeof(rep), (char *) &rep);
+ WriteToClient(client, sizeof(rep), &rep);
if (len)
{
- WriteToClient(client, len, (char *) list);
+ WriteToClient(client, len, list);
DEALLOCATE_LOCAL(list);
}
@@ -1495,7 +1495,7 @@ ProcSyncGetPriority(client)
swapl(&rep.priority);
}
- WriteToClient(client, sizeof(xSyncGetPriorityReply), (char *) &rep);
+ WriteToClient(client, sizeof(xSyncGetPriorityReply), &rep);
return (client->noClientException);
}
@@ -1780,7 +1780,7 @@ ProcSyncQueryCounter(client)
swapl(&rep.value_hi);
swapl(&rep.value_lo);
}
- WriteToClient(client, sizeof(xSyncQueryCounterReply), (char *) &rep);
+ WriteToClient(client, sizeof(xSyncQueryCounterReply), &rep);
return (client->noClientException);
}
@@ -1966,7 +1966,7 @@ ProcSyncQueryAlarm(client)
swapl(&rep.delta_lo);
}
- WriteToClient(client, sizeof(xSyncQueryAlarmReply), (char *) &rep);
+ WriteToClient(client, sizeof(xSyncQueryAlarmReply), &rep);
return (client->noClientException);
}
diff --git a/nx-X11/programs/Xserver/Xext/xcmisc.c b/nx-X11/programs/Xserver/Xext/xcmisc.c
index 447f1699c..534c9ad2f 100644
--- a/nx-X11/programs/Xserver/Xext/xcmisc.c
+++ b/nx-X11/programs/Xserver/Xext/xcmisc.c
@@ -110,7 +110,7 @@ ProcXCMiscGetVersion(client)
swaps(&rep.majorVersion);
swaps(&rep.minorVersion);
}
- WriteToClient(client, sizeof(xXCMiscGetVersionReply), (char *)&rep);
+ WriteToClient(client, sizeof(xXCMiscGetVersionReply), &rep);
return(client->noClientException);
}
@@ -133,7 +133,7 @@ ProcXCMiscGetXIDRange(client)
swapl(&rep.start_id);
swapl(&rep.count);
}
- WriteToClient(client, sizeof(xXCMiscGetXIDRangeReply), (char *)&rep);
+ WriteToClient(client, sizeof(xXCMiscGetXIDRangeReply), &rep);
return(client->noClientException);
}
@@ -166,7 +166,7 @@ ProcXCMiscGetXIDList(client)
swapl(&rep.length);
swapl(&rep.count);
}
- WriteToClient(client, sizeof(xXCMiscGetXIDListReply), (char *)&rep);
+ WriteToClient(client, sizeof(xXCMiscGetXIDListReply), &rep);
if (count)
{
client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write;
diff --git a/nx-X11/programs/Xserver/Xext/xf86bigfont.c b/nx-X11/programs/Xserver/Xext/xf86bigfont.c
index 18c96db13..023b3e6a5 100644
--- a/nx-X11/programs/Xserver/Xext/xf86bigfont.c
+++ b/nx-X11/programs/Xserver/Xext/xf86bigfont.c
@@ -384,7 +384,7 @@ ProcXF86BigfontQueryVersion(
swapl(&reply.signature);
}
WriteToClient(client,
- sizeof(xXF86BigfontQueryVersionReply), (char *)&reply);
+ sizeof(xXF86BigfontQueryVersionReply), &reply);
return client->noClientException;
}
@@ -718,7 +718,7 @@ ProcXF86BigfontQueryFont(
}
}
}
- WriteToClient(client, rlength, (char *)reply);
+ WriteToClient(client, rlength, reply);
DEALLOCATE_LOCAL(reply);
if (nCharInfos > 0) {
if (shmid == -1) DEALLOCATE_LOCAL(pIndex2UniqIndex);
diff --git a/nx-X11/programs/Xserver/Xext/xres.c b/nx-X11/programs/Xserver/Xext/xres.c
index 82632a031..8605e4c7e 100644
--- a/nx-X11/programs/Xserver/Xext/xres.c
+++ b/nx-X11/programs/Xserver/Xext/xres.c
@@ -40,7 +40,7 @@ ProcXResQueryVersion (ClientPtr client)
swaps(&rep.server_major);
swaps(&rep.server_minor);
}
- WriteToClient(client, sizeof (xXResQueryVersionReply), (char *)&rep);
+ WriteToClient(client, sizeof (xXResQueryVersionReply), &rep);
return (client->noClientException);
}
@@ -73,7 +73,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;
@@ -86,7 +86,7 @@ ProcXResQueryClients (ClientPtr client)
swapl (&scratch.resource_base);
swapl (&scratch.resource_mask);
}
- WriteToClient (client, sz_xXResClient, (char *) &scratch);
+ WriteToClient (client, sz_xXResClient, &scratch);
}
}
@@ -144,7 +144,7 @@ ProcXResQueryClientResources (ClientPtr client)
swapl (&rep.length);
swapl (&rep.num_types);
}
- WriteToClient (client,sizeof(xXResQueryClientResourcesReply),(char*)&rep);
+ WriteToClient (client,sizeof(xXResQueryClientResourcesReply),&rep);
if(num_types) {
xXResType scratch;
@@ -165,7 +165,7 @@ ProcXResQueryClientResources (ClientPtr client)
swapl (&scratch.resource_type);
swapl (&scratch.count);
}
- WriteToClient (client, sz_xXResType, (char *) &scratch);
+ WriteToClient (client, sz_xXResType, &scratch);
}
}
@@ -222,7 +222,7 @@ ProcXResQueryClientPixmapBytes (ClientPtr client)
swapl (&rep.bytes);
swapl (&rep.bytes_overflow);
}
- WriteToClient (client,sizeof(xXResQueryClientPixmapBytesReply),(char*)&rep);
+ WriteToClient (client,sizeof(xXResQueryClientPixmapBytesReply),&rep);
return (client->noClientException);
}
diff --git a/nx-X11/programs/Xserver/Xext/xtest.c b/nx-X11/programs/Xserver/Xext/xtest.c
index 4d82f403d..c5aef9220 100644
--- a/nx-X11/programs/Xserver/Xext/xtest.c
+++ b/nx-X11/programs/Xserver/Xext/xtest.c
@@ -132,7 +132,7 @@ ProcXTestGetVersion(client)
swaps(&rep.sequenceNumber);
swaps(&rep.minorVersion);
}
- WriteToClient(client, sizeof(xXTestGetVersionReply), (char *)&rep);
+ WriteToClient(client, sizeof(xXTestGetVersionReply), &rep);
return(client->noClientException);
}
@@ -168,7 +168,7 @@ ProcXTestCompareCursor(client)
if (client->swapped) {
swaps(&rep.sequenceNumber);
}
- WriteToClient(client, sizeof(xXTestCompareCursorReply), (char *)&rep);
+ WriteToClient(client, sizeof(xXTestCompareCursorReply), &rep);
return(client->noClientException);
}
diff --git a/nx-X11/programs/Xserver/Xext/xvdisp.c b/nx-X11/programs/Xserver/Xext/xvdisp.c
index 923202701..66dcc791a 100644
--- a/nx-X11/programs/Xserver/Xext/xvdisp.c
+++ b/nx-X11/programs/Xserver/Xext/xvdisp.c
@@ -160,59 +160,59 @@ static int SWriteImageFormatInfo(ClientPtr, xvImageFormatInfo*);
#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
@@ -1278,7 +1278,7 @@ ProcXvQueryImageAttributes(ClientPtr client)
_WriteQueryImageAttributesReply(client, &rep);
if(client->swapped)
SwapLongs((CARD32*)offsets, rep.length);
- WriteToClient(client, rep.length << 2, (char*)offsets);
+ WriteToClient(client, rep.length << 2, offsets);
free(offsets);
@@ -1639,7 +1639,7 @@ SWriteQueryExtensionReply(
swaps(&rep->version);
swaps(&rep->revision);
- (void)WriteToClient(client, sz_xvQueryExtensionReply, (char *)&rep);
+ WriteToClient(client, sz_xvQueryExtensionReply, &rep);
return Success;
}
@@ -1653,7 +1653,7 @@ SWriteQueryAdaptorsReply(
swapl(&rep->length);
swaps(&rep->num_adaptors);
- (void)WriteToClient(client, sz_xvQueryAdaptorsReply, (char *)&rep);
+ WriteToClient(client, sz_xvQueryAdaptorsReply, &rep);
return Success;
}
@@ -1667,7 +1667,7 @@ SWriteQueryEncodingsReply(
swapl(&rep->length);
swaps(&rep->num_encodings);
- (void)WriteToClient(client, sz_xvQueryEncodingsReply, (char *)&rep);
+ WriteToClient(client, sz_xvQueryEncodingsReply, &rep);
return Success;
}
@@ -1682,7 +1682,7 @@ SWriteAdaptorInfo(
swaps(&pAdaptor->num_ports);
swaps(&pAdaptor->num_formats);
- (void)WriteToClient(client, sz_xvAdaptorInfo, (char *)pAdaptor);
+ WriteToClient(client, sz_xvAdaptorInfo, pAdaptor);
return Success;
}
@@ -1698,7 +1698,7 @@ SWriteEncodingInfo(
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;
}
@@ -1709,7 +1709,7 @@ SWriteFormat(
xvFormat *pFormat
){
swapl(&pFormat->visual);
- (void)WriteToClient(client, sz_xvFormat, (char *)pFormat);
+ WriteToClient(client, sz_xvFormat, pFormat);
return Success;
}
@@ -1723,7 +1723,7 @@ SWriteAttributeInfo(
swapl(&pAtt->size);
swapl(&pAtt->min);
swapl(&pAtt->max);
- (void)WriteToClient(client, sz_xvAttributeInfo, (char *)pAtt);
+ WriteToClient(client, sz_xvAttributeInfo, pAtt);
return Success;
}
@@ -1747,7 +1747,7 @@ SWriteImageFormatInfo(
swapl(&pImage->vert_u_period);
swapl(&pImage->vert_v_period);
- (void)WriteToClient(client, sz_xvImageFormatInfo, (char *)pImage);
+ WriteToClient(client, sz_xvImageFormatInfo, pImage);
return Success;
}
@@ -1762,7 +1762,7 @@ SWriteGrabPortReply(
swaps(&rep->sequenceNumber);
swapl(&rep->length);
- (void)WriteToClient(client, sz_xvGrabPortReply, (char *)&rep);
+ WriteToClient(client, sz_xvGrabPortReply, &rep);
return Success;
}
@@ -1776,7 +1776,7 @@ SWriteGetPortAttributeReply(
swapl(&rep->length);
swapl(&rep->value);
- (void)WriteToClient(client, sz_xvGetPortAttributeReply, (char *)&rep);
+ WriteToClient(client, sz_xvGetPortAttributeReply, &rep);
return Success;
}
@@ -1791,7 +1791,7 @@ SWriteQueryBestSizeReply(
swaps(&rep->actual_width);
swaps(&rep->actual_height);
- (void)WriteToClient(client, sz_xvQueryBestSizeReply, (char *)&rep);
+ WriteToClient(client, sz_xvQueryBestSizeReply, &rep);
return Success;
}
@@ -1806,7 +1806,7 @@ SWriteQueryPortAttributesReply(
swapl(&rep->num_attributes);
swapl(&rep->text_size);
- (void)WriteToClient(client, sz_xvQueryPortAttributesReply, (char *)&rep);
+ WriteToClient(client, sz_xvQueryPortAttributesReply, &rep);
return Success;
}
@@ -1823,7 +1823,7 @@ SWriteQueryImageAttributesReply(
swaps(&rep->width);
swaps(&rep->height);
- (void)WriteToClient(client, sz_xvQueryImageAttributesReply, (char *)&rep);
+ WriteToClient(client, sz_xvQueryImageAttributesReply, &rep);
return Success;
}
@@ -1838,7 +1838,7 @@ SWriteListImageFormatsReply(
swapl(&rep->length);
swapl(&rep->num_formats);
- (void)WriteToClient(client, sz_xvListImageFormatsReply, (char *)&rep);
+ WriteToClient(client, sz_xvListImageFormatsReply, &rep);
return Success;
}
diff --git a/nx-X11/programs/Xserver/Xext/xvmc.c b/nx-X11/programs/Xserver/Xext/xvmc.c
index bce7fbf7a..fa3d1540a 100644
--- a/nx-X11/programs/Xserver/Xext/xvmc.c
+++ b/nx-X11/programs/Xserver/Xext/xvmc.c
@@ -129,7 +129,7 @@ ProcXvMCQueryVersion(ClientPtr client)
rep.length = 0;
rep.major = XvMCVersion;
rep.minor = XvMCRevision;
- WriteToClient(client, sizeof(xvmcQueryVersionReply), (char*)&rep);
+ WriteToClient(client, sizeof(xvmcQueryVersionReply), &rep);
return Success;
}
@@ -169,7 +169,7 @@ ProcXvMCListSurfaceTypes(ClientPtr client)
rep.num = (adaptor) ? adaptor->num_surfaces : 0;
rep.length = rep.num * sizeof(xvmcSurfaceInfo) >> 2;
- WriteToClient(client, sizeof(xvmcListSurfaceTypesReply), (char*)&rep);
+ WriteToClient(client, sizeof(xvmcListSurfaceTypesReply), &rep);
for(i = 0; i < rep.num; i++) {
surface = adaptor->surfaces[i];
@@ -181,7 +181,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;
@@ -270,9 +270,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);
if(data)
@@ -332,9 +332,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);
if(data)
@@ -443,9 +443,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);
if(data)
@@ -525,7 +525,7 @@ ProcXvMCListSubpictureTypes(ClientPtr client)
rep.length = rep.num * sizeof(xvImageFormatInfo) >> 2;
- WriteToClient(client, sizeof(xvmcListSubpictureTypesReply), (char*)&rep);
+ WriteToClient(client, sizeof(xvmcListSubpictureTypesReply), &rep);
for(i = 0; i < rep.num; i++) {
pImage = NULL;
@@ -561,7 +561,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;
@@ -631,7 +631,7 @@ ProcXvMCGetDRInfo(ClientPtr client)
#endif /* HAS_XVMCSHM */
WriteToClient(client, sizeof(xvmcGetDRInfoReply),
- (char*)&rep);
+ &rep);
if (rep.length) {
WriteToClient(client, rep.nameLen,
pScreenPriv->clientDriverName);