Commit f6a1bda2 authored by Alan Coopersmith's avatar Alan Coopersmith Committed by Mike Gabriel

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: 's avatarAlan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: 's avatarKeith Packard <keithp@keithp.com> Tested-by: 's avatarDaniel Stone <daniel@fooishbar.org> Backport to nx-libs: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
parent ff81a526
...@@ -736,7 +736,7 @@ int DoMakeCurrent( __GLXclientState *cl, ...@@ -736,7 +736,7 @@ int DoMakeCurrent( __GLXclientState *cl,
if (client->swapped) { if (client->swapped) {
__glXSwapMakeCurrentReply(client, &reply); __glXSwapMakeCurrentReply(client, &reply);
} else { } else {
WriteToClient(client, sz_xGLXMakeCurrentReply, (char *)&reply); WriteToClient(client, sz_xGLXMakeCurrentReply, &reply);
} }
return Success; return Success;
} }
...@@ -765,7 +765,7 @@ int __glXIsDirect(__GLXclientState *cl, GLbyte *pc) ...@@ -765,7 +765,7 @@ int __glXIsDirect(__GLXclientState *cl, GLbyte *pc)
if (client->swapped) { if (client->swapped) {
__glXSwapIsDirectReply(client, &reply); __glXSwapIsDirectReply(client, &reply);
} else { } else {
WriteToClient(client, sz_xGLXIsDirectReply, (char *)&reply); WriteToClient(client, sz_xGLXIsDirectReply, &reply);
} }
return Success; return Success;
...@@ -797,7 +797,7 @@ int __glXQueryVersion(__GLXclientState *cl, GLbyte *pc) ...@@ -797,7 +797,7 @@ int __glXQueryVersion(__GLXclientState *cl, GLbyte *pc)
if (client->swapped) { if (client->swapped) {
__glXSwapQueryVersionReply(client, &reply); __glXSwapQueryVersionReply(client, &reply);
} else { } else {
WriteToClient(client, sz_xGLXQueryVersionReply, (char *)&reply); WriteToClient(client, sz_xGLXQueryVersionReply, &reply);
} }
return Success; return Success;
} }
...@@ -948,7 +948,7 @@ int DoGetVisualConfigs(__GLXclientState *cl, unsigned screen, ...@@ -948,7 +948,7 @@ int DoGetVisualConfigs(__GLXclientState *cl, unsigned screen,
__GLX_SWAP_INT(&reply.numProps); __GLX_SWAP_INT(&reply.numProps);
} }
WriteToClient(client, sz_xGLXGetVisualConfigsReply, (char *)&reply); WriteToClient(client, sz_xGLXGetVisualConfigsReply, &reply);
for ( modes = pGlxScreen->modes ; modes != NULL ; modes = modes->next ) { for ( modes = pGlxScreen->modes ; modes != NULL ; modes = modes->next ) {
if (modes->visualID == 0) { if (modes->visualID == 0) {
...@@ -999,7 +999,7 @@ int DoGetVisualConfigs(__GLXclientState *cl, unsigned screen, ...@@ -999,7 +999,7 @@ int DoGetVisualConfigs(__GLXclientState *cl, unsigned screen,
__GLX_SWAP_INT_ARRAY(buf, __GLX_TOTAL_CONFIG); __GLX_SWAP_INT_ARRAY(buf, __GLX_TOTAL_CONFIG);
} }
WriteToClient(client, __GLX_SIZE_CARD32 * __GLX_TOTAL_CONFIG, WriteToClient(client, __GLX_SIZE_CARD32 * __GLX_TOTAL_CONFIG,
(char *)buf); buf);
} }
return Success; return Success;
} }
...@@ -1056,7 +1056,7 @@ int DoGetFBConfigs(__GLXclientState *cl, unsigned screen, GLboolean do_swap) ...@@ -1056,7 +1056,7 @@ int DoGetFBConfigs(__GLXclientState *cl, unsigned screen, GLboolean do_swap)
__GLX_SWAP_INT(&reply.numAttribs); __GLX_SWAP_INT(&reply.numAttribs);
} }
WriteToClient(client, sz_xGLXGetFBConfigsReply, (char *)&reply); WriteToClient(client, sz_xGLXGetFBConfigsReply, &reply);
for ( modes = pGlxScreen->modes ; modes != NULL ; modes = modes->next ) { for ( modes = pGlxScreen->modes ; modes != NULL ; modes = modes->next ) {
if (modes->visualID == 0) { if (modes->visualID == 0) {
...@@ -1108,7 +1108,7 @@ int DoGetFBConfigs(__GLXclientState *cl, unsigned screen, GLboolean do_swap) ...@@ -1108,7 +1108,7 @@ int DoGetFBConfigs(__GLXclientState *cl, unsigned screen, GLboolean do_swap)
__GLX_SWAP_INT_ARRAY(buf, __GLX_FBCONFIG_ATTRIBS_LENGTH); __GLX_SWAP_INT_ARRAY(buf, __GLX_FBCONFIG_ATTRIBS_LENGTH);
} }
WriteToClient(client, __GLX_SIZE_CARD32 * __GLX_FBCONFIG_ATTRIBS_LENGTH, WriteToClient(client, __GLX_SIZE_CARD32 * __GLX_FBCONFIG_ATTRIBS_LENGTH,
(char *)buf); buf);
} }
return Success; return Success;
} }
...@@ -1397,8 +1397,8 @@ int __glXQueryContextInfoEXT(__GLXclientState *cl, GLbyte *pc) ...@@ -1397,8 +1397,8 @@ int __glXQueryContextInfoEXT(__GLXclientState *cl, GLbyte *pc)
if (client->swapped) { if (client->swapped) {
__glXSwapQueryContextInfoEXTReply(client, &reply, sendBuf); __glXSwapQueryContextInfoEXTReply(client, &reply, sendBuf);
} else { } else {
WriteToClient(client, sz_xGLXQueryContextInfoEXTReply, (char *)&reply); WriteToClient(client, sz_xGLXQueryContextInfoEXTReply, &reply);
WriteToClient(client, nReplyBytes, (char *)sendBuf); WriteToClient(client, nReplyBytes, sendBuf);
} }
__glXFree((char *)sendBuf); __glXFree((char *)sendBuf);
...@@ -1798,7 +1798,7 @@ static int __glXQueryMaxSwapBarriersSGIX(__GLXclientState *cl, GLbyte *pc) ...@@ -1798,7 +1798,7 @@ static int __glXQueryMaxSwapBarriersSGIX(__GLXclientState *cl, GLbyte *pc)
} }
WriteToClient(client, sz_xGLXQueryMaxSwapBarriersSGIXReply, WriteToClient(client, sz_xGLXQueryMaxSwapBarriersSGIXReply,
(char *) &reply); &reply);
return Success; return Success;
} }
...@@ -1837,9 +1837,9 @@ static int __glxQueryHyperpipeNetworkSGIX(__GLXclientState *cl, GLbyte *pc) ...@@ -1837,9 +1837,9 @@ static int __glxQueryHyperpipeNetworkSGIX(__GLXclientState *cl, GLbyte *pc)
__GLX_SWAP_INT(&reply.npipes); __GLX_SWAP_INT(&reply.npipes);
} }
WriteToClient(client, sz_xGLXQueryHyperpipeNetworkSGIXReply, WriteToClient(client, sz_xGLXQueryHyperpipeNetworkSGIXReply,
(char *) &reply); &reply);
WriteToClient(client, length << 2, (char *)rdata); WriteToClient(client, length << 2, rdata);
return Success; return Success;
} }
...@@ -1875,7 +1875,7 @@ static int __glxDestroyHyperpipeConfigSGIX (__GLXclientState *cl, GLbyte *pc) ...@@ -1875,7 +1875,7 @@ static int __glxDestroyHyperpipeConfigSGIX (__GLXclientState *cl, GLbyte *pc)
} }
WriteToClient(client, WriteToClient(client,
sz_xGLXDestroyHyperpipeConfigSGIXReply, sz_xGLXDestroyHyperpipeConfigSGIXReply,
(char *) &reply); &reply);
return Success; return Success;
} }
...@@ -1916,9 +1916,9 @@ static int __glxQueryHyperpipeConfigSGIX(__GLXclientState *cl, GLbyte *pc) ...@@ -1916,9 +1916,9 @@ static int __glxQueryHyperpipeConfigSGIX(__GLXclientState *cl, GLbyte *pc)
} }
WriteToClient(client, sz_xGLXQueryHyperpipeConfigSGIXReply, WriteToClient(client, sz_xGLXQueryHyperpipeConfigSGIXReply,
(char *) &reply); &reply);
WriteToClient(client, length << 2, (char *)rdata); WriteToClient(client, length << 2, rdata);
return Success; return Success;
} }
...@@ -1961,7 +1961,7 @@ static int __glxHyperpipeConfigSGIX(__GLXclientState *cl, GLbyte *pc) ...@@ -1961,7 +1961,7 @@ static int __glxHyperpipeConfigSGIX(__GLXclientState *cl, GLbyte *pc)
} }
WriteToClient(client, sz_xGLXHyperpipeConfigSGIXReply, WriteToClient(client, sz_xGLXHyperpipeConfigSGIXReply,
(char *) &reply); &reply);
return Success; return Success;
} }
...@@ -2089,8 +2089,8 @@ int __glXQueryExtensionsString(__GLXclientState *cl, GLbyte *pc) ...@@ -2089,8 +2089,8 @@ int __glXQueryExtensionsString(__GLXclientState *cl, GLbyte *pc)
if (client->swapped) { if (client->swapped) {
glxSwapQueryExtensionsStringReply(client, &reply, buf); glxSwapQueryExtensionsStringReply(client, &reply, buf);
} else { } else {
WriteToClient(client, sz_xGLXQueryExtensionsStringReply,(char *)&reply); WriteToClient(client, sz_xGLXQueryExtensionsStringReply,&reply);
WriteToClient(client, (int)(length << 2), (char *)buf); WriteToClient(client, (int)(length << 2), buf);
} }
__glXFree(buf); __glXFree(buf);
...@@ -2146,7 +2146,7 @@ int __glXQueryServerString(__GLXclientState *cl, GLbyte *pc) ...@@ -2146,7 +2146,7 @@ int __glXQueryServerString(__GLXclientState *cl, GLbyte *pc)
if (client->swapped) { if (client->swapped) {
glxSwapQueryServerStringReply(client, &reply, buf); glxSwapQueryServerStringReply(client, &reply, buf);
} else { } else {
WriteToClient(client, sz_xGLXQueryServerStringReply, (char *)&reply); WriteToClient(client, sz_xGLXQueryServerStringReply, &reply);
WriteToClient(client, (int)(length << 2), buf); WriteToClient(client, (int)(length << 2), buf);
} }
......
...@@ -397,7 +397,7 @@ void __glXSwapMakeCurrentReply(ClientPtr client, xGLXMakeCurrentReply *reply) ...@@ -397,7 +397,7 @@ void __glXSwapMakeCurrentReply(ClientPtr client, xGLXMakeCurrentReply *reply)
__GLX_SWAP_SHORT(&reply->sequenceNumber); __GLX_SWAP_SHORT(&reply->sequenceNumber);
__GLX_SWAP_INT(&reply->length); __GLX_SWAP_INT(&reply->length);
__GLX_SWAP_INT(&reply->contextTag); __GLX_SWAP_INT(&reply->contextTag);
WriteToClient(client, sz_xGLXMakeCurrentReply, (char *)reply); WriteToClient(client, sz_xGLXMakeCurrentReply, reply);
} }
void __glXSwapIsDirectReply(ClientPtr client, xGLXIsDirectReply *reply) void __glXSwapIsDirectReply(ClientPtr client, xGLXIsDirectReply *reply)
...@@ -405,7 +405,7 @@ void __glXSwapIsDirectReply(ClientPtr client, xGLXIsDirectReply *reply) ...@@ -405,7 +405,7 @@ void __glXSwapIsDirectReply(ClientPtr client, xGLXIsDirectReply *reply)
__GLX_DECLARE_SWAP_VARIABLES; __GLX_DECLARE_SWAP_VARIABLES;
__GLX_SWAP_SHORT(&reply->sequenceNumber); __GLX_SWAP_SHORT(&reply->sequenceNumber);
__GLX_SWAP_INT(&reply->length); __GLX_SWAP_INT(&reply->length);
WriteToClient(client, sz_xGLXIsDirectReply, (char *)reply); WriteToClient(client, sz_xGLXIsDirectReply, reply);
} }
void __glXSwapQueryVersionReply(ClientPtr client, xGLXQueryVersionReply *reply) void __glXSwapQueryVersionReply(ClientPtr client, xGLXQueryVersionReply *reply)
...@@ -415,7 +415,7 @@ void __glXSwapQueryVersionReply(ClientPtr client, xGLXQueryVersionReply *reply) ...@@ -415,7 +415,7 @@ void __glXSwapQueryVersionReply(ClientPtr client, xGLXQueryVersionReply *reply)
__GLX_SWAP_INT(&reply->length); __GLX_SWAP_INT(&reply->length);
__GLX_SWAP_INT(&reply->majorVersion); __GLX_SWAP_INT(&reply->majorVersion);
__GLX_SWAP_INT(&reply->minorVersion); __GLX_SWAP_INT(&reply->minorVersion);
WriteToClient(client, sz_xGLXQueryVersionReply, (char *)reply); WriteToClient(client, sz_xGLXQueryVersionReply, reply);
} }
void glxSwapQueryExtensionsStringReply(ClientPtr client, void glxSwapQueryExtensionsStringReply(ClientPtr client,
...@@ -427,7 +427,7 @@ void glxSwapQueryExtensionsStringReply(ClientPtr client, ...@@ -427,7 +427,7 @@ void glxSwapQueryExtensionsStringReply(ClientPtr client,
__GLX_SWAP_SHORT(&reply->sequenceNumber); __GLX_SWAP_SHORT(&reply->sequenceNumber);
__GLX_SWAP_INT(&reply->length); __GLX_SWAP_INT(&reply->length);
__GLX_SWAP_INT(&reply->n); __GLX_SWAP_INT(&reply->n);
WriteToClient(client, sz_xGLXQueryExtensionsStringReply, (char *)reply); WriteToClient(client, sz_xGLXQueryExtensionsStringReply, reply);
__GLX_SWAP_INT_ARRAY((int *)buf, length); __GLX_SWAP_INT_ARRAY((int *)buf, length);
WriteToClient(client, length << 2, buf); WriteToClient(client, length << 2, buf);
} }
...@@ -440,7 +440,7 @@ void glxSwapQueryServerStringReply(ClientPtr client, ...@@ -440,7 +440,7 @@ void glxSwapQueryServerStringReply(ClientPtr client,
__GLX_SWAP_SHORT(&reply->sequenceNumber); __GLX_SWAP_SHORT(&reply->sequenceNumber);
__GLX_SWAP_INT(&reply->length); __GLX_SWAP_INT(&reply->length);
__GLX_SWAP_INT(&reply->n); __GLX_SWAP_INT(&reply->n);
WriteToClient(client, sz_xGLXQueryServerStringReply, (char *)reply); WriteToClient(client, sz_xGLXQueryServerStringReply, reply);
/** no swap is needed for an array of chars **/ /** no swap is needed for an array of chars **/
/* __GLX_SWAP_INT_ARRAY((int *)buf, length); */ /* __GLX_SWAP_INT_ARRAY((int *)buf, length); */
WriteToClient(client, length << 2, buf); WriteToClient(client, length << 2, buf);
...@@ -454,9 +454,9 @@ void __glXSwapQueryContextInfoEXTReply(ClientPtr client, xGLXQueryContextInfoEXT ...@@ -454,9 +454,9 @@ void __glXSwapQueryContextInfoEXTReply(ClientPtr client, xGLXQueryContextInfoEXT
__GLX_SWAP_SHORT(&reply->sequenceNumber); __GLX_SWAP_SHORT(&reply->sequenceNumber);
__GLX_SWAP_INT(&reply->length); __GLX_SWAP_INT(&reply->length);
__GLX_SWAP_INT(&reply->n); __GLX_SWAP_INT(&reply->n);
WriteToClient(client, sz_xGLXQueryContextInfoEXTReply, (char *)reply); WriteToClient(client, sz_xGLXQueryContextInfoEXTReply, reply);
__GLX_SWAP_INT_ARRAY((int *)buf, length); __GLX_SWAP_INT_ARRAY((int *)buf, length);
WriteToClient(client, length << 2, (char *)buf); WriteToClient(client, length << 2, buf);
} }
......
...@@ -114,7 +114,7 @@ __glXFBMemSwapBuffers(__GLXdrawablePrivate *glxPriv) ...@@ -114,7 +114,7 @@ __glXFBMemSwapBuffers(__GLXdrawablePrivate *glxPriv)
depth, depth,
0, 0, width, height, 0, 0, width, height,
pad, ZPixmap, pad, ZPixmap,
(char *)buf); buf);
return GL_TRUE; return GL_TRUE;
} }
......
...@@ -201,9 +201,9 @@ int __glXDisp_RenderMode(__GLXclientState *cl, GLbyte *pc) ...@@ -201,9 +201,9 @@ int __glXDisp_RenderMode(__GLXclientState *cl, GLbyte *pc)
reply.retval = retval; reply.retval = retval;
reply.size = nitems; reply.size = nitems;
reply.newMode = newMode; reply.newMode = newMode;
WriteToClient(client, sz_xGLXRenderModeReply, (char *)&reply); WriteToClient(client, sz_xGLXRenderModeReply, &reply);
if (retBytes) { if (retBytes) {
WriteToClient(client, retBytes, (char *)retBuffer); WriteToClient(client, retBytes, retBuffer);
} }
return Success; return Success;
} }
...@@ -380,7 +380,7 @@ int DoGetString(__GLXclientState *cl, GLbyte *pc, GLboolean need_swap) ...@@ -380,7 +380,7 @@ int DoGetString(__GLXclientState *cl, GLbyte *pc, GLboolean need_swap)
} }
__GLX_SEND_HEADER(); __GLX_SEND_HEADER();
WriteToClient(client, length, (char *) string); WriteToClient(client, length, string);
if (buf != NULL) { if (buf != NULL) {
__glXFree(buf); __glXFree(buf);
} }
......
...@@ -218,9 +218,9 @@ int __glXDispSwap_RenderMode(__GLXclientState *cl, GLbyte *pc) ...@@ -218,9 +218,9 @@ int __glXDispSwap_RenderMode(__GLXclientState *cl, GLbyte *pc)
__GLX_SWAP_INT(&reply.retval); __GLX_SWAP_INT(&reply.retval);
__GLX_SWAP_INT(&reply.size); __GLX_SWAP_INT(&reply.size);
__GLX_SWAP_INT(&reply.newMode); __GLX_SWAP_INT(&reply.newMode);
WriteToClient(client, sz_xGLXRenderModeReply, (char *)&reply); WriteToClient(client, sz_xGLXRenderModeReply, &reply);
if (retBytes) { if (retBytes) {
WriteToClient(client, retBytes, (char *)retBuffer); WriteToClient(client, retBytes, retBuffer);
} }
return Success; return Success;
} }
......
...@@ -69,7 +69,7 @@ extern xGLXSingleReply __glXReply; ...@@ -69,7 +69,7 @@ extern xGLXSingleReply __glXReply;
__glXReply.sequenceNumber = client->sequence; __glXReply.sequenceNumber = client->sequence;
#define __GLX_SEND_HEADER() \ #define __GLX_SEND_HEADER() \
WriteToClient( client, sz_xGLXSingleReply, (char *)&__glXReply); WriteToClient( client, sz_xGLXSingleReply, &__glXReply);
#define __GLX_PUT_RETVAL(a) \ #define __GLX_PUT_RETVAL(a) \
__glXReply.retval = (a); __glXReply.retval = (a);
...@@ -123,19 +123,19 @@ extern xGLXSingleReply __glXReply; ...@@ -123,19 +123,19 @@ extern xGLXSingleReply __glXReply;
*(GLdouble *)&__glXReply.pad3 = *(GLdouble *)answer *(GLdouble *)&__glXReply.pad3 = *(GLdouble *)answer
#define __GLX_SEND_BYTE_ARRAY(len) \ #define __GLX_SEND_BYTE_ARRAY(len) \
WriteToClient(client, __GLX_PAD((len)*__GLX_SIZE_INT8), (char *)answer) WriteToClient(client, __GLX_PAD((len)*__GLX_SIZE_INT8), answer)
#define __GLX_SEND_SHORT_ARRAY(len) \ #define __GLX_SEND_SHORT_ARRAY(len) \
WriteToClient(client, __GLX_PAD((len)*__GLX_SIZE_INT16), (char *)answer) WriteToClient(client, __GLX_PAD((len)*__GLX_SIZE_INT16), answer)
#define __GLX_SEND_INT_ARRAY(len) \ #define __GLX_SEND_INT_ARRAY(len) \
WriteToClient(client, (len)*__GLX_SIZE_INT32, (char *)answer) WriteToClient(client, (len)*__GLX_SIZE_INT32, answer)
#define __GLX_SEND_FLOAT_ARRAY(len) \ #define __GLX_SEND_FLOAT_ARRAY(len) \
WriteToClient(client, (len)*__GLX_SIZE_FLOAT32, (char *)answer) WriteToClient(client, (len)*__GLX_SIZE_FLOAT32, answer)
#define __GLX_SEND_DOUBLE_ARRAY(len) \ #define __GLX_SEND_DOUBLE_ARRAY(len) \
WriteToClient(client, (len)*__GLX_SIZE_FLOAT64, (char *)answer) WriteToClient(client, (len)*__GLX_SIZE_FLOAT64, answer)
#define __GLX_SEND_VOID_ARRAY(len) __GLX_SEND_BYTE_ARRAY(len) #define __GLX_SEND_VOID_ARRAY(len) __GLX_SEND_BYTE_ARRAY(len)
......
...@@ -102,6 +102,6 @@ ProcBigReqDispatch (client) ...@@ -102,6 +102,6 @@ ProcBigReqDispatch (client)
swaps(&rep.sequenceNumber); swaps(&rep.sequenceNumber);
swapl(&rep.max_request_size); swapl(&rep.max_request_size);
} }
WriteToClient(client, sizeof(xBigReqEnableReply), (char *)&rep); WriteToClient(client, sizeof(xBigReqEnableReply), &rep);
return(client->noClientException); return(client->noClientException);
} }
...@@ -118,7 +118,7 @@ ProcDPMSGetVersion(client) ...@@ -118,7 +118,7 @@ ProcDPMSGetVersion(client)
swaps(&rep.majorVersion); swaps(&rep.majorVersion);
swaps(&rep.minorVersion); swaps(&rep.minorVersion);
} }
WriteToClient(client, sizeof(xDPMSGetVersionReply), (char *)&rep); WriteToClient(client, sizeof(xDPMSGetVersionReply), &rep);
return(client->noClientException); return(client->noClientException);
} }
...@@ -138,7 +138,7 @@ ProcDPMSCapable(register ClientPtr client) ...@@ -138,7 +138,7 @@ ProcDPMSCapable(register ClientPtr client)
if (client->swapped) { if (client->swapped) {
swaps(&rep.sequenceNumber); swaps(&rep.sequenceNumber);
} }
WriteToClient(client, sizeof(xDPMSCapableReply), (char *)&rep); WriteToClient(client, sizeof(xDPMSCapableReply), &rep);
return(client->noClientException); return(client->noClientException);
} }
...@@ -164,7 +164,7 @@ ProcDPMSGetTimeouts(client) ...@@ -164,7 +164,7 @@ ProcDPMSGetTimeouts(client)
swaps(&rep.suspend); swaps(&rep.suspend);
swaps(&rep.off); swaps(&rep.off);
} }
WriteToClient(client, sizeof(xDPMSGetTimeoutsReply), (char *)&rep); WriteToClient(client, sizeof(xDPMSGetTimeoutsReply), &rep);
return(client->noClientException); return(client->noClientException);
} }
...@@ -275,7 +275,7 @@ ProcDPMSInfo(register ClientPtr client) ...@@ -275,7 +275,7 @@ ProcDPMSInfo(register ClientPtr client)
swaps(&rep.sequenceNumber); swaps(&rep.sequenceNumber);
swaps(&rep.power_level); swaps(&rep.power_level);
} }
WriteToClient(client, sizeof(xDPMSInfoReply), (char *)&rep); WriteToClient(client, sizeof(xDPMSInfoReply), &rep);
return(client->noClientException); return(client->noClientException);
} }
......
...@@ -949,7 +949,7 @@ ProcPanoramiXQueryVersion (ClientPtr client) ...@@ -949,7 +949,7 @@ ProcPanoramiXQueryVersion (ClientPtr client)
swaps(&rep.majorVersion); swaps(&rep.majorVersion);
swaps(&rep.minorVersion); swaps(&rep.minorVersion);
} }
WriteToClient(client, sizeof (xPanoramiXQueryVersionReply), (char *)&rep); WriteToClient(client, sizeof (xPanoramiXQueryVersionReply), &rep);
return (client->noClientException); return (client->noClientException);
} }
...@@ -973,7 +973,7 @@ ProcPanoramiXGetState(ClientPtr client) ...@@ -973,7 +973,7 @@ ProcPanoramiXGetState(ClientPtr client)
swapl (&rep.length); swapl (&rep.length);
swapl ((int* )&rep.state); swapl ((int* )&rep.state);
} }
WriteToClient (client, sizeof (xPanoramiXGetStateReply), (char *) &rep); WriteToClient (client, sizeof (xPanoramiXGetStateReply), &rep);
return client->noClientException; return client->noClientException;
} }
...@@ -998,7 +998,7 @@ ProcPanoramiXGetScreenCount(ClientPtr client) ...@@ -998,7 +998,7 @@ ProcPanoramiXGetScreenCount(ClientPtr client)
swapl (&rep.length); swapl (&rep.length);
swapl ((int* )&rep.ScreenCount); swapl ((int* )&rep.ScreenCount);
} }
WriteToClient (client, sizeof (xPanoramiXGetScreenCountReply), (char *) &rep); WriteToClient (client, sizeof (xPanoramiXGetScreenCountReply), &rep);
return client->noClientException; return client->noClientException;
} }
...@@ -1025,7 +1025,7 @@ ProcPanoramiXGetScreenSize(ClientPtr client) ...@@ -1025,7 +1025,7 @@ ProcPanoramiXGetScreenSize(ClientPtr client)
swapl (&rep.width); swapl (&rep.width);
swapl (&rep.height); swapl (&rep.height);
} }
WriteToClient (client, sizeof (xPanoramiXGetScreenSizeReply), (char *) &rep); WriteToClient (client, sizeof (xPanoramiXGetScreenSizeReply), &rep);
return client->noClientException; return client->noClientException;
} }
...@@ -1047,7 +1047,7 @@ ProcXineramaIsActive(ClientPtr client) ...@@ -1047,7 +1047,7 @@ ProcXineramaIsActive(ClientPtr client)
swapl (&rep.length); swapl (&rep.length);
swapl (&rep.state); swapl (&rep.state);
} }
WriteToClient (client, sizeof (xXineramaIsActiveReply), (char *) &rep); WriteToClient (client, sizeof (xXineramaIsActiveReply), &rep);
return client->noClientException; return client->noClientException;
} }
...@@ -1069,7 +1069,7 @@ ProcXineramaQueryScreens(ClientPtr client) ...@@ -1069,7 +1069,7 @@ ProcXineramaQueryScreens(ClientPtr client)
swapl (&rep.length); swapl (&rep.length);
swapl (&rep.number); swapl (&rep.number);
} }
WriteToClient (client, sizeof (xXineramaQueryScreensReply), (char *) &rep); WriteToClient (client, sizeof (xXineramaQueryScreensReply), &rep);
if(!noPanoramiXExtension) { if(!noPanoramiXExtension) {
xXineramaScreenInfo scratch; xXineramaScreenInfo scratch;
...@@ -1087,7 +1087,7 @@ ProcXineramaQueryScreens(ClientPtr client) ...@@ -1087,7 +1087,7 @@ ProcXineramaQueryScreens(ClientPtr client)
swaps (&scratch.width); swaps (&scratch.width);
swaps (&scratch.height); swaps (&scratch.height);
} }
WriteToClient (client, sz_XineramaScreenInfo, (char *) &scratch); WriteToClient (client, sz_XineramaScreenInfo, &scratch);
} }
} }
......
...@@ -1863,7 +1863,7 @@ int PanoramiXGetImage(ClientPtr client) ...@@ -1863,7 +1863,7 @@ int PanoramiXGetImage(ClientPtr client)
XineramaGetImageData(drawables, x, y + linesDone, w, nlines, XineramaGetImageData(drawables, x, y + linesDone, w, nlines,
format, planemask, pBuf, widthBytesLine, isRoot); format, planemask, pBuf, widthBytesLine, isRoot);
(void)WriteToClient(client, WriteToClient(client,
(int)(nlines * widthBytesLine), (int)(nlines * widthBytesLine),
pBuf); pBuf);
linesDone += nlines; linesDone += nlines;
...@@ -1881,7 +1881,7 @@ int PanoramiXGetImage(ClientPtr client) ...@@ -1881,7 +1881,7 @@ int PanoramiXGetImage(ClientPtr client)
nlines, format, plane, pBuf, nlines, format, plane, pBuf,
widthBytesLine, isRoot); widthBytesLine, isRoot);
(void)WriteToClient(client, WriteToClient(client,
(int)(nlines * widthBytesLine), (int)(nlines * widthBytesLine),
pBuf); pBuf);
......
...@@ -702,7 +702,7 @@ ProcScreenSaverQueryVersion (client) ...@@ -702,7 +702,7 @@ ProcScreenSaverQueryVersion (client)
swaps(&rep.sequenceNumber); swaps(&rep.sequenceNumber);
swapl(&rep.length); swapl(&rep.length);
} }
WriteToClient(client, sizeof (xScreenSaverQueryVersionReply), (char *)&rep); WriteToClient(client, sizeof (xScreenSaverQueryVersionReply), &rep);
return (client->noClientException); return (client->noClientException);
} }
...@@ -774,7 +774,7 @@ ProcScreenSaverQueryInfo (client) ...@@ -774,7 +774,7 @@ ProcScreenSaverQueryInfo (client)
swapl (&rep.idle); swapl (&rep.idle);
swapl (&rep.eventMask); swapl (&rep.eventMask);
} }
WriteToClient(client, sizeof (xScreenSaverQueryInfoReply), (char *)&rep); WriteToClient(client, sizeof (xScreenSaverQueryInfoReply), &rep);
return (client->noClientException); return (client->noClientException);
} }
......
...@@ -489,8 +489,8 @@ ProcSecurityQueryVersion( ...@@ -489,8 +489,8 @@ ProcSecurityQueryVersion(
swaps(&rep.majorVersion); swaps(&rep.majorVersion);
swaps(&rep.minorVersion); swaps(&rep.minorVersion);
} }
(void)WriteToClient(client, SIZEOF(xSecurityQueryVersionReply), WriteToClient(client, SIZEOF(xSecurityQueryVersionReply),
(char *)&rep); &rep);
return (client->noClientException); return (client->noClientException);
} /* ProcSecurityQueryVersion */ } /* ProcSecurityQueryVersion */
...@@ -709,7 +709,7 @@ ProcSecurityGenerateAuthorization( ...@@ -709,7 +709,7 @@ ProcSecurityGenerateAuthorization(
} }
WriteToClient(client, SIZEOF(xSecurityGenerateAuthorizationReply), WriteToClient(client, SIZEOF(xSecurityGenerateAuthorizationReply),
(char *)&rep); &rep);
WriteToClient(client, authdata_len, pAuthdata); WriteToClient(client, authdata_len, pAuthdata);
SecurityAudit("client %d generated authorization %d trust %d timeout %d group %d events %d\n", SecurityAudit("client %d generated authorization %d trust %d timeout %d group %d events %d\n",
......
...@@ -303,7 +303,7 @@ ProcShapeQueryVersion (client) ...@@ -303,7 +303,7 @@ ProcShapeQueryVersion (client)
swaps(&rep.majorVersion); swaps(&rep.majorVersion);
swaps(&rep.minorVersion); swaps(&rep.minorVersion);
} }
WriteToClient(client, sizeof (xShapeQueryVersionReply), (char *)&rep); WriteToClient(client, sizeof (xShapeQueryVersionReply), &rep);
return (client->noClientException); return (client->noClientException);
} }
...@@ -763,7 +763,7 @@ ProcShapeQueryExtents (client) ...@@ -763,7 +763,7 @@ ProcShapeQueryExtents (client)
swaps(&rep.widthClipShape); swaps(&rep.widthClipShape);
swaps(&rep.heightClipShape); swaps(&rep.heightClipShape);
} }
WriteToClient(client, sizeof (xShapeQueryExtentsReply), (char *)&rep); WriteToClient(client, sizeof (xShapeQueryExtentsReply), &rep);
return (client->noClientException); return (client->noClientException);
} }
...@@ -1016,7 +1016,7 @@ ProcShapeInputSelected (client) ...@@ -1016,7 +1016,7 @@ ProcShapeInputSelected (client)
swaps (&rep.sequenceNumber); swaps (&rep.sequenceNumber);
swapl (&rep.length); swapl (&rep.length);
} }
WriteToClient (client, sizeof (xShapeInputSelectedReply), (char *) &rep); WriteToClient (client, sizeof (xShapeInputSelectedReply), &rep);
return (client->noClientException); return (client->noClientException);
} }
...@@ -1099,8 +1099,8 @@ ProcShapeGetRectangles (client) ...@@ -1099,8 +1099,8 @@ ProcShapeGetRectangles (client)
swapl (&rep.nrects); swapl (&rep.nrects);
SwapShorts ((short *)rects, (unsigned long)nrects * 4); SwapShorts ((short *)rects, (unsigned long)nrects * 4);
} }
WriteToClient (client, sizeof (rep), (char *) &rep); WriteToClient (client, sizeof (rep), &rep);
WriteToClient (client, nrects * sizeof (xRectangle), (char *) rects); WriteToClient (client, nrects * sizeof (xRectangle), rects);
DEALLOCATE_LOCAL (rects); DEALLOCATE_LOCAL (rects);
return client->noClientException; return client->noClientException;
} }
......
...@@ -366,7 +366,7 @@ ProcShmQueryVersion(client) ...@@ -366,7 +366,7 @@ ProcShmQueryVersion(client)
swaps(&rep.uid); swaps(&rep.uid);
swaps(&rep.gid); swaps(&rep.gid);
} }
WriteToClient(client, sizeof(xShmQueryVersionReply), (char *)&rep); WriteToClient(client, sizeof(xShmQueryVersionReply), &rep);
return (client->noClientException); return (client->noClientException);
} }
...@@ -716,7 +716,7 @@ ProcPanoramiXShmGetImage(ClientPtr client) ...@@ -716,7 +716,7 @@ ProcPanoramiXShmGetImage(ClientPtr client)
swapl(&xgi.visual); swapl(&xgi.visual);
swapl(&xgi.size); swapl(&xgi.size);
} }
WriteToClient(client, sizeof(xShmGetImageReply), (char *)&xgi); WriteToClient(client, sizeof(xShmGetImageReply), &xgi);
return(client->noClientException); return(client->noClientException);
} }
...@@ -1044,7 +1044,7 @@ ProcShmGetImage(client) ...@@ -1044,7 +1044,7 @@ ProcShmGetImage(client)
swapl(&xgi.visual); swapl(&xgi.visual);
swapl(&xgi.size); swapl(&xgi.size);
} }
WriteToClient(client, sizeof(xShmGetImageReply), (char *)&xgi); WriteToClient(client, sizeof(xShmGetImageReply), &xgi);
return(client->noClientException); return(client->noClientException);
} }
......
...@@ -1349,7 +1349,7 @@ ProcSyncInitialize(client) ...@@ -1349,7 +1349,7 @@ ProcSyncInitialize(client)
{ {
swaps(&rep.sequenceNumber); swaps(&rep.sequenceNumber);
} }
WriteToClient(client, sizeof(rep), (char *) &rep); WriteToClient(client, sizeof(rep), &rep);
return (client->noClientException); return (client->noClientException);
} }
...@@ -1419,10 +1419,10 @@ ProcSyncListSystemCounters(client) ...@@ -1419,10 +1419,10 @@ ProcSyncListSystemCounters(client)
((sz_xSyncSystemCounter + namelen + 3) & ~3)); ((sz_xSyncSystemCounter + namelen + 3) & ~3));
} }
WriteToClient(client, sizeof(rep), (char *) &rep); WriteToClient(client, sizeof(rep), &rep);
if (len) if (len)
{ {
WriteToClient(client, len, (char *) list); WriteToClient(client, len, list);
DEALLOCATE_LOCAL(list); DEALLOCATE_LOCAL(list);
} }
...@@ -1495,7 +1495,7 @@ ProcSyncGetPriority(client) ...@@ -1495,7 +1495,7 @@ ProcSyncGetPriority(client)
swapl(&rep.priority); swapl(&rep.priority);
} }
WriteToClient(client, sizeof(xSyncGetPriorityReply), (char *) &rep); WriteToClient(client, sizeof(xSyncGetPriorityReply), &rep);
return (client->noClientException); return (client->noClientException);
} }
...@@ -1780,7 +1780,7 @@ ProcSyncQueryCounter(client) ...@@ -1780,7 +1780,7 @@ ProcSyncQueryCounter(client)
swapl(&rep.value_hi); swapl(&rep.value_hi);
swapl(&rep.value_lo); swapl(&rep.value_lo);
} }
WriteToClient(client, sizeof(xSyncQueryCounterReply), (char *) &rep); WriteToClient(client, sizeof(xSyncQueryCounterReply), &rep);
return (client->noClientException); return (client->noClientException);
} }
...@@ -1966,7 +1966,7 @@ ProcSyncQueryAlarm(client) ...@@ -1966,7 +1966,7 @@ ProcSyncQueryAlarm(client)
swapl(&rep.delta_lo); swapl(&rep.delta_lo);
} }
WriteToClient(client, sizeof(xSyncQueryAlarmReply), (char *) &rep); WriteToClient(client, sizeof(xSyncQueryAlarmReply), &rep);
return (client->noClientException); return (client->noClientException);
} }
......
...@@ -110,7 +110,7 @@ ProcXCMiscGetVersion(client) ...@@ -110,7 +110,7 @@ ProcXCMiscGetVersion(client)
swaps(&rep.majorVersion); swaps(&rep.majorVersion);
swaps(&rep.minorVersion); swaps(&rep.minorVersion);
} }
WriteToClient(client, sizeof(xXCMiscGetVersionReply), (char *)&rep); WriteToClient(client, sizeof(xXCMiscGetVersionReply), &rep);
return(client->noClientException); return(client->noClientException);
} }
...@@ -133,7 +133,7 @@ ProcXCMiscGetXIDRange(client) ...@@ -133,7 +133,7 @@ ProcXCMiscGetXIDRange(client)
swapl(&rep.start_id); swapl(&rep.start_id);
swapl(&rep.count); swapl(&rep.count);
} }
WriteToClient(client, sizeof(xXCMiscGetXIDRangeReply), (char *)&rep); WriteToClient(client, sizeof(xXCMiscGetXIDRangeReply), &rep);
return(client->noClientException); return(client->noClientException);
} }
...@@ -166,7 +166,7 @@ ProcXCMiscGetXIDList(client) ...@@ -166,7 +166,7 @@ ProcXCMiscGetXIDList(client)
swapl(&rep.length); swapl(&rep.length);
swapl(&rep.count); swapl(&rep.count);
} }
WriteToClient(client, sizeof(xXCMiscGetXIDListReply), (char *)&rep); WriteToClient(client, sizeof(xXCMiscGetXIDListReply), &rep);
if (count) if (count)
{ {
client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write;
......
...@@ -384,7 +384,7 @@ ProcXF86BigfontQueryVersion( ...@@ -384,7 +384,7 @@ ProcXF86BigfontQueryVersion(
swapl(&reply.signature); swapl(&reply.signature);
} }
WriteToClient(client, WriteToClient(client,
sizeof(xXF86BigfontQueryVersionReply), (char *)&reply); sizeof(xXF86BigfontQueryVersionReply), &reply);
return client->noClientException; return client->noClientException;
} }
...@@ -718,7 +718,7 @@ ProcXF86BigfontQueryFont( ...@@ -718,7 +718,7 @@ ProcXF86BigfontQueryFont(
} }
} }
} }
WriteToClient(client, rlength, (char *)reply); WriteToClient(client, rlength, reply);
DEALLOCATE_LOCAL(reply); DEALLOCATE_LOCAL(reply);
if (nCharInfos > 0) { if (nCharInfos > 0) {
if (shmid == -1) DEALLOCATE_LOCAL(pIndex2UniqIndex); if (shmid == -1) DEALLOCATE_LOCAL(pIndex2UniqIndex);
......
...@@ -40,7 +40,7 @@ ProcXResQueryVersion (ClientPtr client) ...@@ -40,7 +40,7 @@ ProcXResQueryVersion (ClientPtr client)
swaps(&rep.server_major); swaps(&rep.server_major);
swaps(&rep.server_minor); swaps(&rep.server_minor);
} }
WriteToClient(client, sizeof (xXResQueryVersionReply), (char *)&rep); WriteToClient(client, sizeof (xXResQueryVersionReply), &rep);
return (client->noClientException); return (client->noClientException);
} }
...@@ -73,7 +73,7 @@ ProcXResQueryClients (ClientPtr client) ...@@ -73,7 +73,7 @@ ProcXResQueryClients (ClientPtr client)
swapl (&rep.length); swapl (&rep.length);
swapl (&rep.num_clients); swapl (&rep.num_clients);
} }
WriteToClient (client, sizeof (xXResQueryClientsReply), (char *) &rep); WriteToClient (client, sizeof (xXResQueryClientsReply), &rep);
if(num_clients) { if(num_clients) {
xXResClient scratch; xXResClient scratch;
...@@ -86,7 +86,7 @@ ProcXResQueryClients (ClientPtr client) ...@@ -86,7 +86,7 @@ ProcXResQueryClients (ClientPtr client)
swapl (&scratch.resource_base); swapl (&scratch.resource_base);
swapl (&scratch.resource_mask); swapl (&scratch.resource_mask);
} }
WriteToClient (client, sz_xXResClient, (char *) &scratch); WriteToClient (client, sz_xXResClient, &scratch);
} }
} }
...@@ -144,7 +144,7 @@ ProcXResQueryClientResources (ClientPtr client) ...@@ -144,7 +144,7 @@ ProcXResQueryClientResources (ClientPtr client)
swapl (&rep.length); swapl (&rep.length);
swapl (&rep.num_types); swapl (&rep.num_types);
} }
WriteToClient (client,sizeof(xXResQueryClientResourcesReply),(char*)&rep); WriteToClient (client,sizeof(xXResQueryClientResourcesReply),&rep);
if(num_types) { if(num_types) {
xXResType scratch; xXResType scratch;
...@@ -165,7 +165,7 @@ ProcXResQueryClientResources (ClientPtr client) ...@@ -165,7 +165,7 @@ ProcXResQueryClientResources (ClientPtr client)
swapl (&scratch.resource_type); swapl (&scratch.resource_type);
swapl (&scratch.count); swapl (&scratch.count);
} }
WriteToClient (client, sz_xXResType, (char *) &scratch); WriteToClient (client, sz_xXResType, &scratch);
} }
} }
...@@ -222,7 +222,7 @@ ProcXResQueryClientPixmapBytes (ClientPtr client) ...@@ -222,7 +222,7 @@ ProcXResQueryClientPixmapBytes (ClientPtr client)
swapl (&rep.bytes); swapl (&rep.bytes);
swapl (&rep.bytes_overflow); swapl (&rep.bytes_overflow);
} }
WriteToClient (client,sizeof(xXResQueryClientPixmapBytesReply),(char*)&rep); WriteToClient (client,sizeof(xXResQueryClientPixmapBytesReply),&rep);
return (client->noClientException); return (client->noClientException);
} }
......
...@@ -132,7 +132,7 @@ ProcXTestGetVersion(client) ...@@ -132,7 +132,7 @@ ProcXTestGetVersion(client)
swaps(&rep.sequenceNumber); swaps(&rep.sequenceNumber);
swaps(&rep.minorVersion); swaps(&rep.minorVersion);
} }
WriteToClient(client, sizeof(xXTestGetVersionReply), (char *)&rep); WriteToClient(client, sizeof(xXTestGetVersionReply), &rep);
return(client->noClientException); return(client->noClientException);
} }
...@@ -168,7 +168,7 @@ ProcXTestCompareCursor(client) ...@@ -168,7 +168,7 @@ ProcXTestCompareCursor(client)
if (client->swapped) { if (client->swapped) {
swaps(&rep.sequenceNumber); swaps(&rep.sequenceNumber);
} }
WriteToClient(client, sizeof(xXTestCompareCursorReply), (char *)&rep); WriteToClient(client, sizeof(xXTestCompareCursorReply), &rep);
return(client->noClientException); return(client->noClientException);
} }
......
...@@ -160,59 +160,59 @@ static int SWriteImageFormatInfo(ClientPtr, xvImageFormatInfo*); ...@@ -160,59 +160,59 @@ static int SWriteImageFormatInfo(ClientPtr, xvImageFormatInfo*);
#define _WriteQueryAdaptorsReply(_c,_d) \ #define _WriteQueryAdaptorsReply(_c,_d) \
if ((_c)->swapped) SWriteQueryAdaptorsReply(_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) \ #define _WriteQueryExtensionReply(_c,_d) \
if ((_c)->swapped) SWriteQueryExtensionReply(_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) \ #define _WriteQueryEncodingsReply(_c,_d) \
if ((_c)->swapped) SWriteQueryEncodingsReply(_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) \ #define _WriteAdaptorInfo(_c,_d) \
if ((_c)->swapped) SWriteAdaptorInfo(_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) \ #define _WriteAttributeInfo(_c,_d) \
if ((_c)->swapped) SWriteAttributeInfo(_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) \ #define _WriteEncodingInfo(_c,_d) \
if ((_c)->swapped) SWriteEncodingInfo(_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) \ #define _WriteFormat(_c,_d) \
if ((_c)->swapped) SWriteFormat(_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) \ #define _WriteGrabPortReply(_c,_d) \
if ((_c)->swapped) SWriteGrabPortReply(_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) \ #define _WriteGetPortAttributeReply(_c,_d) \
if ((_c)->swapped) SWriteGetPortAttributeReply(_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) \ #define _WriteQueryBestSizeReply(_c,_d) \
if ((_c)->swapped) SWriteQueryBestSizeReply(_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) \ #define _WriteQueryPortAttributesReply(_c,_d) \
if ((_c)->swapped) SWriteQueryPortAttributesReply(_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) \ #define _WriteQueryImageAttributesReply(_c,_d) \
if ((_c)->swapped) SWriteQueryImageAttributesReply(_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) \ #define _WriteListImageFormatsReply(_c,_d) \
if ((_c)->swapped) SWriteListImageFormatsReply(_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) \ #define _WriteImageFormatInfo(_c,_d) \
if ((_c)->swapped) SWriteImageFormatInfo(_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) \ #define _AllocatePort(_i,_p) \
((_p)->id != _i) ? (* (_p)->pAdaptor->ddAllocatePort)(_i,_p,&_p) : Success ((_p)->id != _i) ? (* (_p)->pAdaptor->ddAllocatePort)(_i,_p,&_p) : Success
...@@ -1278,7 +1278,7 @@ ProcXvQueryImageAttributes(ClientPtr client) ...@@ -1278,7 +1278,7 @@ ProcXvQueryImageAttributes(ClientPtr client)
_WriteQueryImageAttributesReply(client, &rep); _WriteQueryImageAttributesReply(client, &rep);
if(client->swapped) if(client->swapped)
SwapLongs((CARD32*)offsets, rep.length); SwapLongs((CARD32*)offsets, rep.length);
WriteToClient(client, rep.length << 2, (char*)offsets); WriteToClient(client, rep.length << 2, offsets);
free(offsets); free(offsets);
...@@ -1639,7 +1639,7 @@ SWriteQueryExtensionReply( ...@@ -1639,7 +1639,7 @@ SWriteQueryExtensionReply(
swaps(&rep->version); swaps(&rep->version);
swaps(&rep->revision); swaps(&rep->revision);
(void)WriteToClient(client, sz_xvQueryExtensionReply, (char *)&rep); WriteToClient(client, sz_xvQueryExtensionReply, &rep);
return Success; return Success;
} }
...@@ -1653,7 +1653,7 @@ SWriteQueryAdaptorsReply( ...@@ -1653,7 +1653,7 @@ SWriteQueryAdaptorsReply(
swapl(&rep->length); swapl(&rep->length);
swaps(&rep->num_adaptors); swaps(&rep->num_adaptors);
(void)WriteToClient(client, sz_xvQueryAdaptorsReply, (char *)&rep); WriteToClient(client, sz_xvQueryAdaptorsReply, &rep);
return Success; return Success;
} }
...@@ -1667,7 +1667,7 @@ SWriteQueryEncodingsReply( ...@@ -1667,7 +1667,7 @@ SWriteQueryEncodingsReply(
swapl(&rep->length); swapl(&rep->length);
swaps(&rep->num_encodings); swaps(&rep->num_encodings);
(void)WriteToClient(client, sz_xvQueryEncodingsReply, (char *)&rep); WriteToClient(client, sz_xvQueryEncodingsReply, &rep);
return Success; return Success;
} }
...@@ -1682,7 +1682,7 @@ SWriteAdaptorInfo( ...@@ -1682,7 +1682,7 @@ SWriteAdaptorInfo(
swaps(&pAdaptor->num_ports); swaps(&pAdaptor->num_ports);
swaps(&pAdaptor->num_formats); swaps(&pAdaptor->num_formats);
(void)WriteToClient(client, sz_xvAdaptorInfo, (char *)pAdaptor); WriteToClient(client, sz_xvAdaptorInfo, pAdaptor);
return Success; return Success;
} }
...@@ -1698,7 +1698,7 @@ SWriteEncodingInfo( ...@@ -1698,7 +1698,7 @@ SWriteEncodingInfo(
swaps(&pEncoding->height); swaps(&pEncoding->height);
swapl(&pEncoding->rate.numerator); swapl(&pEncoding->rate.numerator);
swapl(&pEncoding->rate.denominator); swapl(&pEncoding->rate.denominator);
(void)WriteToClient(client, sz_xvEncodingInfo, (char *)pEncoding); WriteToClient(client, sz_xvEncodingInfo, pEncoding);
return Success; return Success;
} }
...@@ -1709,7 +1709,7 @@ SWriteFormat( ...@@ -1709,7 +1709,7 @@ SWriteFormat(
xvFormat *pFormat xvFormat *pFormat
){ ){
swapl(&pFormat->visual); swapl(&pFormat->visual);
(void)WriteToClient(client, sz_xvFormat, (char *)pFormat); WriteToClient(client, sz_xvFormat, pFormat);
return Success; return Success;
} }
...@@ -1723,7 +1723,7 @@ SWriteAttributeInfo( ...@@ -1723,7 +1723,7 @@ SWriteAttributeInfo(
swapl(&pAtt->size); swapl(&pAtt->size);
swapl(&pAtt->min); swapl(&pAtt->min);
swapl(&pAtt->max); swapl(&pAtt->max);
(void)WriteToClient(client, sz_xvAttributeInfo, (char *)pAtt); WriteToClient(client, sz_xvAttributeInfo, pAtt);
return Success; return Success;
} }
...@@ -1747,7 +1747,7 @@ SWriteImageFormatInfo( ...@@ -1747,7 +1747,7 @@ SWriteImageFormatInfo(
swapl(&pImage->vert_u_period); swapl(&pImage->vert_u_period);
swapl(&pImage->vert_v_period); swapl(&pImage->vert_v_period);
(void)WriteToClient(client, sz_xvImageFormatInfo, (char *)pImage); WriteToClient(client, sz_xvImageFormatInfo, pImage);
return Success; return Success;
} }
...@@ -1762,7 +1762,7 @@ SWriteGrabPortReply( ...@@ -1762,7 +1762,7 @@ SWriteGrabPortReply(
swaps(&rep->sequenceNumber); swaps(&rep->sequenceNumber);
swapl(&rep->length); swapl(&rep->length);
(void)WriteToClient(client, sz_xvGrabPortReply, (char *)&rep); WriteToClient(client, sz_xvGrabPortReply, &rep);
return Success; return Success;
} }
...@@ -1776,7 +1776,7 @@ SWriteGetPortAttributeReply( ...@@ -1776,7 +1776,7 @@ SWriteGetPortAttributeReply(
swapl(&rep->length); swapl(&rep->length);
swapl(&rep->value); swapl(&rep->value);
(void)WriteToClient(client, sz_xvGetPortAttributeReply, (char *)&rep); WriteToClient(client, sz_xvGetPortAttributeReply, &rep);
return Success; return Success;
} }
...@@ -1791,7 +1791,7 @@ SWriteQueryBestSizeReply( ...@@ -1791,7 +1791,7 @@ SWriteQueryBestSizeReply(
swaps(&rep->actual_width); swaps(&rep->actual_width);
swaps(&rep->actual_height); swaps(&rep->actual_height);
(void)WriteToClient(client, sz_xvQueryBestSizeReply, (char *)&rep); WriteToClient(client, sz_xvQueryBestSizeReply, &rep);
return Success; return Success;
} }
...@@ -1806,7 +1806,7 @@ SWriteQueryPortAttributesReply( ...@@ -1806,7 +1806,7 @@ SWriteQueryPortAttributesReply(
swapl(&rep->num_attributes); swapl(&rep->num_attributes);
swapl(&rep->text_size); swapl(&rep->text_size);
(void)WriteToClient(client, sz_xvQueryPortAttributesReply, (char *)&rep); WriteToClient(client, sz_xvQueryPortAttributesReply, &rep);
return Success; return Success;
} }
...@@ -1823,7 +1823,7 @@ SWriteQueryImageAttributesReply( ...@@ -1823,7 +1823,7 @@ SWriteQueryImageAttributesReply(
swaps(&rep->width); swaps(&rep->width);
swaps(&rep->height); swaps(&rep->height);
(void)WriteToClient(client, sz_xvQueryImageAttributesReply, (char *)&rep); WriteToClient(client, sz_xvQueryImageAttributesReply, &rep);
return Success; return Success;
} }
...@@ -1838,7 +1838,7 @@ SWriteListImageFormatsReply( ...@@ -1838,7 +1838,7 @@ SWriteListImageFormatsReply(
swapl(&rep->length); swapl(&rep->length);
swapl(&rep->num_formats); swapl(&rep->num_formats);
(void)WriteToClient(client, sz_xvListImageFormatsReply, (char *)&rep); WriteToClient(client, sz_xvListImageFormatsReply, &rep);
return Success; return Success;
} }
......
...@@ -129,7 +129,7 @@ ProcXvMCQueryVersion(ClientPtr client) ...@@ -129,7 +129,7 @@ ProcXvMCQueryVersion(ClientPtr client)
rep.length = 0; rep.length = 0;
rep.major = XvMCVersion; rep.major = XvMCVersion;
rep.minor = XvMCRevision; rep.minor = XvMCRevision;
WriteToClient(client, sizeof(xvmcQueryVersionReply), (char*)&rep); WriteToClient(client, sizeof(xvmcQueryVersionReply), &rep);
return Success; return Success;
} }
...@@ -169,7 +169,7 @@ ProcXvMCListSurfaceTypes(ClientPtr client) ...@@ -169,7 +169,7 @@ ProcXvMCListSurfaceTypes(ClientPtr client)
rep.num = (adaptor) ? adaptor->num_surfaces : 0; rep.num = (adaptor) ? adaptor->num_surfaces : 0;
rep.length = rep.num * sizeof(xvmcSurfaceInfo) >> 2; 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++) { for(i = 0; i < rep.num; i++) {
surface = adaptor->surfaces[i]; surface = adaptor->surfaces[i];
...@@ -181,7 +181,7 @@ ProcXvMCListSurfaceTypes(ClientPtr client) ...@@ -181,7 +181,7 @@ ProcXvMCListSurfaceTypes(ClientPtr client)
info.subpicture_max_height = surface->subpicture_max_height; info.subpicture_max_height = surface->subpicture_max_height;
info.mc_type = surface->mc_type; info.mc_type = surface->mc_type;
info.flags = surface->flags; info.flags = surface->flags;
WriteToClient(client, sizeof(xvmcSurfaceInfo), (char*)&info); WriteToClient(client, sizeof(xvmcSurfaceInfo), &info);
} }
return Success; return Success;
...@@ -270,9 +270,9 @@ ProcXvMCCreateContext(ClientPtr client) ...@@ -270,9 +270,9 @@ ProcXvMCCreateContext(ClientPtr client)
rep.flags_return = pContext->flags; rep.flags_return = pContext->flags;
rep.length = dwords; rep.length = dwords;
WriteToClient(client, sizeof(xvmcCreateContextReply), (char*)&rep); WriteToClient(client, sizeof(xvmcCreateContextReply), &rep);
if(dwords) if(dwords)
WriteToClient(client, dwords << 2, (char*)data); WriteToClient(client, dwords << 2, data);
AddResource(pContext->context_id, XvMCRTContext, pContext); AddResource(pContext->context_id, XvMCRTContext, pContext);
if(data) if(data)
...@@ -332,9 +332,9 @@ ProcXvMCCreateSurface(ClientPtr client) ...@@ -332,9 +332,9 @@ ProcXvMCCreateSurface(ClientPtr client)
rep.sequenceNumber = client->sequence; rep.sequenceNumber = client->sequence;
rep.length = dwords; rep.length = dwords;
WriteToClient(client, sizeof(xvmcCreateSurfaceReply), (char*)&rep); WriteToClient(client, sizeof(xvmcCreateSurfaceReply), &rep);
if(dwords) if(dwords)
WriteToClient(client, dwords << 2, (char*)data); WriteToClient(client, dwords << 2, data);
AddResource(pSurface->surface_id, XvMCRTSurface, pSurface); AddResource(pSurface->surface_id, XvMCRTSurface, pSurface);
if(data) if(data)
...@@ -443,9 +443,9 @@ ProcXvMCCreateSubpicture(ClientPtr client) ...@@ -443,9 +443,9 @@ ProcXvMCCreateSubpicture(ClientPtr client)
rep.component_order[3] = pSubpicture->component_order[3]; rep.component_order[3] = pSubpicture->component_order[3];
rep.length = dwords; rep.length = dwords;
WriteToClient(client, sizeof(xvmcCreateSubpictureReply), (char*)&rep); WriteToClient(client, sizeof(xvmcCreateSubpictureReply), &rep);
if(dwords) if(dwords)
WriteToClient(client, dwords << 2, (char*)data); WriteToClient(client, dwords << 2, data);
AddResource(pSubpicture->subpicture_id, XvMCRTSubpicture, pSubpicture); AddResource(pSubpicture->subpicture_id, XvMCRTSubpicture, pSubpicture);
if(data) if(data)
...@@ -525,7 +525,7 @@ ProcXvMCListSubpictureTypes(ClientPtr client) ...@@ -525,7 +525,7 @@ ProcXvMCListSubpictureTypes(ClientPtr client)
rep.length = rep.num * sizeof(xvImageFormatInfo) >> 2; 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++) { for(i = 0; i < rep.num; i++) {
pImage = NULL; pImage = NULL;
...@@ -561,7 +561,7 @@ ProcXvMCListSubpictureTypes(ClientPtr client) ...@@ -561,7 +561,7 @@ ProcXvMCListSubpictureTypes(ClientPtr client)
info.vert_v_period = pImage->vert_v_period; info.vert_v_period = pImage->vert_v_period;
memcpy(&info.comp_order, pImage->component_order, 32); memcpy(&info.comp_order, pImage->component_order, 32);
info.scanline_order = pImage->scanline_order; info.scanline_order = pImage->scanline_order;
WriteToClient(client, sizeof(xvImageFormatInfo), (char*)&info); WriteToClient(client, sizeof(xvImageFormatInfo), &info);
} }
return Success; return Success;
...@@ -631,7 +631,7 @@ ProcXvMCGetDRInfo(ClientPtr client) ...@@ -631,7 +631,7 @@ ProcXvMCGetDRInfo(ClientPtr client)
#endif /* HAS_XVMCSHM */ #endif /* HAS_XVMCSHM */
WriteToClient(client, sizeof(xvmcGetDRInfoReply), WriteToClient(client, sizeof(xvmcGetDRInfoReply),
(char*)&rep); &rep);
if (rep.length) { if (rep.length) {
WriteToClient(client, rep.nameLen, WriteToClient(client, rep.nameLen,
pScreenPriv->clientDriverName); pScreenPriv->clientDriverName);
......
...@@ -210,6 +210,6 @@ SRepXChangeDeviceControl (client, size, rep) ...@@ -210,6 +210,6 @@ SRepXChangeDeviceControl (client, size, rep)
{ {
swaps(&rep->sequenceNumber); swaps(&rep->sequenceNumber);
swapl(&rep->length); swapl(&rep->length);
WriteToClient(client, size, (char *)rep); WriteToClient(client, size, rep);
} }
...@@ -208,5 +208,5 @@ SRepXChangeKeyboardDevice (client, size, rep) ...@@ -208,5 +208,5 @@ SRepXChangeKeyboardDevice (client, size, rep)
{ {
swaps(&rep->sequenceNumber); swaps(&rep->sequenceNumber);
swapl(&rep->length); swapl(&rep->length);
WriteToClient(client, size, (char *)rep); WriteToClient(client, size, rep);
} }
...@@ -254,5 +254,5 @@ SRepXChangePointerDevice (client, size, rep) ...@@ -254,5 +254,5 @@ SRepXChangePointerDevice (client, size, rep)
{ {
swaps(&rep->sequenceNumber); swaps(&rep->sequenceNumber);
swapl(&rep->length); swapl(&rep->length);
WriteToClient(client, size, (char *)rep); WriteToClient(client, size, rep);
} }
...@@ -126,7 +126,7 @@ ProcXGetDeviceButtonMapping (client) ...@@ -126,7 +126,7 @@ ProcXGetDeviceButtonMapping (client)
rep.nElts = b->numButtons; rep.nElts = b->numButtons;
rep.length = (rep.nElts + (4-1))/4; rep.length = (rep.nElts + (4-1))/4;
WriteReplyToClient (client, sizeof (xGetDeviceButtonMappingReply), &rep); WriteReplyToClient (client, sizeof (xGetDeviceButtonMappingReply), &rep);
(void)WriteToClient(client, rep.nElts, WriteToClient(client, rep.nElts,
(char *)&b->map[1]); (char *)&b->map[1]);
return Success; return Success;
} }
...@@ -146,5 +146,5 @@ SRepXGetDeviceButtonMapping (client, size, rep) ...@@ -146,5 +146,5 @@ SRepXGetDeviceButtonMapping (client, size, rep)
{ {
swaps(&rep->sequenceNumber); swaps(&rep->sequenceNumber);
swapl(&rep->length); swapl(&rep->length);
WriteToClient(client, size, (char *)rep); WriteToClient(client, size, rep);
} }
...@@ -220,6 +220,6 @@ SRepXGetDeviceControl (client, size, rep) ...@@ -220,6 +220,6 @@ SRepXGetDeviceControl (client, size, rep)
{ {
swaps(&rep->sequenceNumber); swaps(&rep->sequenceNumber);
swapl(&rep->length); swapl(&rep->length);
WriteToClient(client, size, (char *)rep); WriteToClient(client, size, rep);
} }
...@@ -408,5 +408,5 @@ SRepXGetFeedbackControl (client, size, rep) ...@@ -408,5 +408,5 @@ SRepXGetFeedbackControl (client, size, rep)
swaps(&rep->sequenceNumber); swaps(&rep->sequenceNumber);
swapl(&rep->length); swapl(&rep->length);
swaps(&rep->num_feedbacks); swaps(&rep->num_feedbacks);
WriteToClient(client, size, (char *)rep); WriteToClient(client, size, rep);
} }
...@@ -149,5 +149,5 @@ SRepXGetDeviceFocus (client, size, rep) ...@@ -149,5 +149,5 @@ SRepXGetDeviceFocus (client, size, rep)
swapl(&rep->length); swapl(&rep->length);
swapl(&rep->focus); swapl(&rep->focus);
swapl(&rep->time); swapl(&rep->time);
WriteToClient(client, size, (char *)rep); WriteToClient(client, size, rep);
} }
...@@ -169,6 +169,6 @@ SRepXGetDeviceKeyMapping (client, size, rep) ...@@ -169,6 +169,6 @@ SRepXGetDeviceKeyMapping (client, size, rep)
{ {
swaps(&rep->sequenceNumber); swaps(&rep->sequenceNumber);
swapl(&rep->length); swapl(&rep->length);
WriteToClient(client, size, (char *)rep); WriteToClient(client, size, rep);
} }
...@@ -131,7 +131,7 @@ ProcXGetDeviceModifierMapping(client) ...@@ -131,7 +131,7 @@ ProcXGetDeviceModifierMapping(client)
WriteReplyToClient(client, sizeof(xGetDeviceModifierMappingReply), &rep); WriteReplyToClient(client, sizeof(xGetDeviceModifierMappingReply), &rep);
/* Reply with the (modified by DDX) map that SetModifierMapping passed in */ /* 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; return Success;
} }
...@@ -150,5 +150,5 @@ SRepXGetDeviceModifierMapping (client, size, rep) ...@@ -150,5 +150,5 @@ SRepXGetDeviceModifierMapping (client, size, rep)
{ {
swaps(&rep->sequenceNumber); swaps(&rep->sequenceNumber);
swapl(&rep->length); swapl(&rep->length);
WriteToClient(client, size, (char *)rep); WriteToClient(client, size, rep);
} }
...@@ -207,5 +207,5 @@ SRepXGetDeviceDontPropagateList (client, size, rep) ...@@ -207,5 +207,5 @@ SRepXGetDeviceDontPropagateList (client, size, rep)
swaps(&rep->sequenceNumber); swaps(&rep->sequenceNumber);
swapl(&rep->length); swapl(&rep->length);
swaps(&rep->count); swaps(&rep->count);
WriteToClient(client, size, (char *)rep); WriteToClient(client, size, rep);
} }
...@@ -188,5 +188,5 @@ SRepXGetSelectedExtensionEvents (client, size, rep) ...@@ -188,5 +188,5 @@ SRepXGetSelectedExtensionEvents (client, size, rep)
swapl(&rep->length); swapl(&rep->length);
swaps(&rep->this_client_count); swaps(&rep->this_client_count);
swaps(&rep->all_clients_count); swaps(&rep->all_clients_count);
WriteToClient(client, size, (char *)rep); WriteToClient(client, size, rep);
} }
...@@ -150,5 +150,5 @@ SRepXGetExtensionVersion (client, size, rep) ...@@ -150,5 +150,5 @@ SRepXGetExtensionVersion (client, size, rep)
swapl(&rep->length); swapl(&rep->length);
swaps(&rep->major_version); swaps(&rep->major_version);
swaps(&rep->minor_version); swaps(&rep->minor_version);
WriteToClient(client, size, (char *)rep); WriteToClient(client, size, rep);
} }
...@@ -221,5 +221,5 @@ SRepXGrabDevice (client, size, rep) ...@@ -221,5 +221,5 @@ SRepXGrabDevice (client, size, rep)
{ {
swaps(&rep->sequenceNumber); swaps(&rep->sequenceNumber);
swapl(&rep->length); swapl(&rep->length);
WriteToClient(client, size, (char *)rep); WriteToClient(client, size, rep);
} }
...@@ -180,7 +180,7 @@ ProcXGetDeviceMotionEvents(client) ...@@ -180,7 +180,7 @@ ProcXGetDeviceMotionEvents(client)
bufptr++; bufptr++;
} }
} }
WriteToClient(client, length * 4, (char *)coords); WriteToClient(client, length * 4, coords);
} }
if (coords) if (coords)
DEALLOCATE_LOCAL(coords); DEALLOCATE_LOCAL(coords);
...@@ -203,5 +203,5 @@ SRepXGetDeviceMotionEvents (client, size, rep) ...@@ -203,5 +203,5 @@ SRepXGetDeviceMotionEvents (client, size, rep)
swaps(&rep->sequenceNumber); swaps(&rep->sequenceNumber);
swapl(&rep->length); swapl(&rep->length);
swapl(&rep->nEvents); swapl(&rep->nEvents);
WriteToClient(client, size, (char *)rep); WriteToClient(client, size, rep);
} }
...@@ -396,5 +396,5 @@ SRepXListInputDevices (client, size, rep) ...@@ -396,5 +396,5 @@ SRepXListInputDevices (client, size, rep)
{ {
swaps(&rep->sequenceNumber); swaps(&rep->sequenceNumber);
swapl(&rep->length); swapl(&rep->length);
WriteToClient(client, size, (char *)rep); WriteToClient(client, size, rep);
} }
...@@ -179,7 +179,7 @@ ProcXOpenDevice(client) ...@@ -179,7 +179,7 @@ ProcXOpenDevice(client)
rep.length = (j * sizeof (xInputClassInfo) + 3) >> 2; rep.length = (j * sizeof (xInputClassInfo) + 3) >> 2;
rep.num_classes = j; rep.num_classes = j;
WriteReplyToClient (client, sizeof (xOpenDeviceReply), &rep); WriteReplyToClient (client, sizeof (xOpenDeviceReply), &rep);
WriteToClient(client, j * sizeof (xInputClassInfo), (char *)evbase); WriteToClient(client, j * sizeof (xInputClassInfo), evbase);
return (Success); return (Success);
} }
...@@ -198,5 +198,5 @@ SRepXOpenDevice (client, size, rep) ...@@ -198,5 +198,5 @@ SRepXOpenDevice (client, size, rep)
{ {
swaps(&rep->sequenceNumber); swaps(&rep->sequenceNumber);
swapl(&rep->length); swapl(&rep->length);
WriteToClient(client, size, (char *)rep); WriteToClient(client, size, rep);
} }
...@@ -206,5 +206,5 @@ SRepXQueryDeviceState (client, size, rep) ...@@ -206,5 +206,5 @@ SRepXQueryDeviceState (client, size, rep)
{ {
swaps(&rep->sequenceNumber); swaps(&rep->sequenceNumber);
swapl(&rep->length); swapl(&rep->length);
WriteToClient(client, size, (char *)rep); WriteToClient(client, size, rep);
} }
...@@ -162,5 +162,5 @@ SRepXSetDeviceButtonMapping (client, size, rep) ...@@ -162,5 +162,5 @@ SRepXSetDeviceButtonMapping (client, size, rep)
{ {
swaps(&rep->sequenceNumber); swaps(&rep->sequenceNumber);
swapl(&rep->length); swapl(&rep->length);
WriteToClient(client, size, (char *)rep); WriteToClient(client, size, rep);
} }
...@@ -166,5 +166,5 @@ SRepXSetDeviceValuators (client, size, rep) ...@@ -166,5 +166,5 @@ SRepXSetDeviceValuators (client, size, rep)
{ {
swaps(&rep->sequenceNumber); swaps(&rep->sequenceNumber);
swapl(&rep->length); swapl(&rep->length);
WriteToClient(client, size, (char *)rep); WriteToClient(client, size, rep);
} }
...@@ -155,6 +155,6 @@ SRepXSetDeviceModifierMapping (client, size, rep) ...@@ -155,6 +155,6 @@ SRepXSetDeviceModifierMapping (client, size, rep)
{ {
swaps(&rep->sequenceNumber); swaps(&rep->sequenceNumber);
swapl(&rep->length); swapl(&rep->length);
WriteToClient(client, size, (char *)rep); WriteToClient(client, size, rep);
} }
...@@ -150,5 +150,5 @@ SRepXSetDeviceMode (client, size, rep) ...@@ -150,5 +150,5 @@ SRepXSetDeviceMode (client, size, rep)
{ {
swaps(&rep->sequenceNumber); swaps(&rep->sequenceNumber);
swapl(&rep->length); swapl(&rep->length);
WriteToClient(client, size, (char *)rep); WriteToClient(client, size, rep);
} }
...@@ -132,7 +132,7 @@ ProcCompositeQueryVersion (ClientPtr client) ...@@ -132,7 +132,7 @@ ProcCompositeQueryVersion (ClientPtr client)
swapl(&rep.majorVersion); swapl(&rep.majorVersion);
swapl(&rep.minorVersion); swapl(&rep.minorVersion);
} }
WriteToClient(client, sizeof(xCompositeQueryVersionReply), (char *)&rep); WriteToClient(client, sizeof(xCompositeQueryVersionReply), &rep);
return Success; return Success;
} }
...@@ -405,7 +405,7 @@ ProcCompositeGetOverlayWindow(ClientPtr client) ...@@ -405,7 +405,7 @@ ProcCompositeGetOverlayWindow(ClientPtr client)
swapl(&rep.length); swapl(&rep.length);
swapl(&rep.overlayWin); swapl(&rep.overlayWin);
} }
WriteToClient(client, sz_xCompositeGetOverlayWindowReply, (char *)&rep); WriteToClient(client, sz_xCompositeGetOverlayWindowReply, &rep);
return Success; return Success;
} }
......
...@@ -160,7 +160,7 @@ ProcDamageQueryVersion(ClientPtr client) ...@@ -160,7 +160,7 @@ ProcDamageQueryVersion(ClientPtr client)
swapl(&rep.majorVersion); swapl(&rep.majorVersion);
swapl(&rep.minorVersion); swapl(&rep.minorVersion);
} }
WriteToClient(client, sizeof(xDamageQueryVersionReply), (char *)&rep); WriteToClient(client, sizeof(xDamageQueryVersionReply), &rep);
return(client->noClientException); return(client->noClientException);
} }
......
...@@ -376,7 +376,7 @@ ProcDbeGetVersion(client) ...@@ -376,7 +376,7 @@ ProcDbeGetVersion(client)
swaps(&rep.sequenceNumber); swaps(&rep.sequenceNumber);
} }
WriteToClient(client, sizeof(xDbeGetVersionReply), (char *)&rep); WriteToClient(client, sizeof(xDbeGetVersionReply), &rep);
return(client->noClientException); return(client->noClientException);
...@@ -988,7 +988,7 @@ ProcDbeGetVisualInfo(client) ...@@ -988,7 +988,7 @@ ProcDbeGetVisualInfo(client)
} }
/* Send off reply. */ /* Send off reply. */
WriteToClient(client, sizeof(xDbeGetVisualInfoReply), (char *)&rep); WriteToClient(client, sizeof(xDbeGetVisualInfoReply), &rep);
for (i = 0; i < count; i++) for (i = 0; i < count; i++)
{ {
...@@ -1004,7 +1004,7 @@ ProcDbeGetVisualInfo(client) ...@@ -1004,7 +1004,7 @@ ProcDbeGetVisualInfo(client)
swapl(&data32); swapl(&data32);
} }
WriteToClient(client, sizeof(CARD32), (char *)&data32); WriteToClient(client, sizeof(CARD32), &data32);
/* Now send off visual info items. */ /* Now send off visual info items. */
for (j = 0; j < pScrVisInfo[i].count; j++) for (j = 0; j < pScrVisInfo[i].count; j++)
...@@ -1030,7 +1030,7 @@ ProcDbeGetVisualInfo(client) ...@@ -1030,7 +1030,7 @@ ProcDbeGetVisualInfo(client)
} }
/* Write visualID(32), depth(8), perfLevel(8), and pad(16). */ /* Write visualID(32), depth(8), perfLevel(8), and pad(16). */
WriteToClient(client, 2*sizeof(CARD32), (char *)&visInfo.visualID); WriteToClient(client, 2*sizeof(CARD32), &visInfo.visualID);
} }
} }
...@@ -1098,7 +1098,7 @@ ProcDbeGetBackBufferAttributes(client) ...@@ -1098,7 +1098,7 @@ ProcDbeGetBackBufferAttributes(client)
} }
WriteToClient(client, sizeof(xDbeGetBackBufferAttributesReply), WriteToClient(client, sizeof(xDbeGetBackBufferAttributesReply),
(char *)&rep); &rep);
return(client->noClientException); return(client->noClientException);
} /* ProcDbeGetbackBufferAttributes() */ } /* ProcDbeGetbackBufferAttributes() */
......
...@@ -1041,7 +1041,7 @@ ProcGetModifierMapping(ClientPtr client) ...@@ -1041,7 +1041,7 @@ ProcGetModifierMapping(ClientPtr client)
WriteReplyToClient(client, sizeof(xGetModifierMappingReply), &rep); WriteReplyToClient(client, sizeof(xGetModifierMappingReply), &rep);
/* Use the (modified by DDX) map that SetModifierMapping passed in */ /* Use the (modified by DDX) map that SetModifierMapping passed in */
(void)WriteToClient(client, (int)(keyc->maxKeysPerModifier << 3), WriteToClient(client, (int)(keyc->maxKeysPerModifier << 3),
(char *)keyc->modifierKeyMap); (char *)keyc->modifierKeyMap);
return client->noClientException; return client->noClientException;
} }
...@@ -1178,7 +1178,7 @@ ProcGetPointerMapping(ClientPtr client) ...@@ -1178,7 +1178,7 @@ ProcGetPointerMapping(ClientPtr client)
rep.nElts = butc->numButtons; rep.nElts = butc->numButtons;
rep.length = ((unsigned)rep.nElts + (4-1))/4; rep.length = ((unsigned)rep.nElts + (4-1))/4;
WriteReplyToClient(client, sizeof(xGetPointerMappingReply), &rep); WriteReplyToClient(client, sizeof(xGetPointerMappingReply), &rep);
(void)WriteToClient(client, (int)rep.nElts, (char *)&butc->map[1]); WriteToClient(client, (int)rep.nElts, &butc->map[1]);
return Success; return Success;
} }
......
...@@ -945,7 +945,7 @@ ProcGetAtomName(register ClientPtr client) ...@@ -945,7 +945,7 @@ ProcGetAtomName(register ClientPtr client)
reply.sequenceNumber = client->sequence; reply.sequenceNumber = client->sequence;
reply.nameLength = len; reply.nameLength = len;
WriteReplyToClient(client, sizeof(xGetAtomNameReply), &reply); WriteReplyToClient(client, sizeof(xGetAtomNameReply), &reply);
(void)WriteToClient(client, len, str); WriteToClient(client, len, str);
return(client->noClientException); return(client->noClientException);
} }
else else
...@@ -2278,7 +2278,7 @@ DoGetImage(register ClientPtr client, int format, Drawable drawable, ...@@ -2278,7 +2278,7 @@ DoGetImage(register ClientPtr client, int format, Drawable drawable,
ClientOrder(client)); ClientOrder(client));
/* Don't split me, gcc pukes when you do */ /* Don't split me, gcc pukes when you do */
(void)WriteToClient(client, WriteToClient(client,
(int)(nlines * widthBytesLine), (int)(nlines * widthBytesLine),
pBuf); pBuf);
} }
...@@ -2322,7 +2322,7 @@ DoGetImage(register ClientPtr client, int format, Drawable drawable, ...@@ -2322,7 +2322,7 @@ DoGetImage(register ClientPtr client, int format, Drawable drawable,
ClientOrder (client)); ClientOrder (client));
/* Don't split me, gcc pukes when you do */ /* Don't split me, gcc pukes when you do */
(void)WriteToClient(client, WriteToClient(client,
(int)(nlines * widthBytesLine), (int)(nlines * widthBytesLine),
pBuf); pBuf);
} }
...@@ -3441,7 +3441,7 @@ ProcGetFontPath(register ClientPtr client) ...@@ -3441,7 +3441,7 @@ ProcGetFontPath(register ClientPtr client)
WriteReplyToClient(client, sizeof(xGetFontPathReply), &reply); WriteReplyToClient(client, sizeof(xGetFontPathReply), &reply);
if (stringLens || numpaths) if (stringLens || numpaths)
(void)WriteToClient(client, stringLens + numpaths, (char *)bufferStart); WriteToClient(client, stringLens + numpaths, bufferStart);
return(client->noClientException); return(client->noClientException);
} }
...@@ -3835,8 +3835,8 @@ SendConnSetup(register ClientPtr client, char *reason) ...@@ -3835,8 +3835,8 @@ SendConnSetup(register ClientPtr client, char *reason)
if (client->swapped) if (client->swapped)
WriteSConnSetupPrefix(client, &csp); WriteSConnSetupPrefix(client, &csp);
else else
(void)WriteToClient(client, sz_xConnSetupPrefix, (char *) &csp); WriteToClient(client, sz_xConnSetupPrefix, &csp);
(void)WriteToClient(client, (int)csp.lengthReason, reason); WriteToClient(client, (int)csp.lengthReason, reason);
return (client->noClientException = -1); return (client->noClientException = -1);
} }
...@@ -3893,9 +3893,9 @@ SendConnSetup(register ClientPtr client, char *reason) ...@@ -3893,9 +3893,9 @@ SendConnSetup(register ClientPtr client, char *reason)
} }
else else
{ {
(void)WriteToClient(client, sizeof(xConnSetupPrefix), WriteToClient(client, sizeof(xConnSetupPrefix),
(char *) lconnSetupPrefix); (char *) lconnSetupPrefix);
(void)WriteToClient(client, (int)(lconnSetupPrefix->length << 2), WriteToClient(client, (int)(lconnSetupPrefix->length << 2),
lConnectionInfo); lConnectionInfo);
} }
client->clientState = ClientStateRunning; client->clientState = ClientStateRunning;
......
...@@ -821,7 +821,7 @@ finish: ...@@ -821,7 +821,7 @@ finish:
reply.length = (stringLens + nnames + 3) >> 2; reply.length = (stringLens + nnames + 3) >> 2;
client->pSwapReplyFunc = ReplySwapVector[X_ListFonts]; client->pSwapReplyFunc = ReplySwapVector[X_ListFonts];
WriteSwappedDataToClient(client, sizeof(xListFontsReply), &reply); WriteSwappedDataToClient(client, sizeof(xListFontsReply), &reply);
(void) WriteToClient(client, stringLens + nnames, bufferStart); WriteToClient(client, stringLens + nnames, bufferStart);
DEALLOCATE_LOCAL(bufferStart); DEALLOCATE_LOCAL(bufferStart);
bail: bail:
...@@ -1081,7 +1081,7 @@ doListFontsWithInfo(ClientPtr client, LFWIclosurePtr c) ...@@ -1081,7 +1081,7 @@ doListFontsWithInfo(ClientPtr client, LFWIclosurePtr c)
pFP++; pFP++;
} }
WriteSwappedDataToClient(client, length, reply); WriteSwappedDataToClient(client, length, reply);
(void) WriteToClient(client, namelen, name); WriteToClient(client, namelen, name);
if (pFontInfo == &fontInfo) if (pFontInfo == &fontInfo)
{ {
free(fontInfo.props); free(fontInfo.props);
......
...@@ -4494,11 +4494,11 @@ WriteEventsToClient(ClientPtr pClient, int count, xEvent *events) ...@@ -4494,11 +4494,11 @@ WriteEventsToClient(ClientPtr pClient, int count, xEvent *events)
this event was sent with "SendEvent." */ this event was sent with "SendEvent." */
(*EventSwapVector[eventFrom->u.u.type & 0177]) (*EventSwapVector[eventFrom->u.u.type & 0177])
(eventFrom, &eventTo); (eventFrom, &eventTo);
(void)WriteToClient(pClient, sizeof(xEvent), (char *)&eventTo); WriteToClient(pClient, sizeof(xEvent), &eventTo);
} }
} }
else else
{ {
(void)WriteToClient(pClient, count * sizeof(xEvent), (char *) events); WriteToClient(pClient, count * sizeof(xEvent), events);
} }
} }
...@@ -601,7 +601,7 @@ finish: ...@@ -601,7 +601,7 @@ finish:
reply.length = (stringLens + nnames + 3) >> 2; reply.length = (stringLens + nnames + 3) >> 2;
client->pSwapReplyFunc = ReplySwapVector[X_ListFonts]; client->pSwapReplyFunc = ReplySwapVector[X_ListFonts];
WriteSwappedDataToClient(client, sizeof(xListFontsReply), &reply); WriteSwappedDataToClient(client, sizeof(xListFontsReply), &reply);
(void) WriteToClient(client, stringLens + nnames, bufferStart); WriteToClient(client, stringLens + nnames, bufferStart);
DEALLOCATE_LOCAL(bufferStart); DEALLOCATE_LOCAL(bufferStart);
bail: bail:
...@@ -883,7 +883,7 @@ doListFontsWithInfo(ClientPtr client, LFWIclosurePtr c) ...@@ -883,7 +883,7 @@ doListFontsWithInfo(ClientPtr client, LFWIclosurePtr c)
pFP++; pFP++;
} }
WriteSwappedDataToClient(client, length, reply); WriteSwappedDataToClient(client, length, reply);
(void) WriteToClient(client, namelen, name); WriteToClient(client, namelen, name);
if (pFontInfo == &fontInfo) if (pFontInfo == &fontInfo)
{ {
free(fontInfo.props); free(fontInfo.props);
......
...@@ -150,7 +150,7 @@ ProcRenderQueryVersion (ClientPtr client) ...@@ -150,7 +150,7 @@ ProcRenderQueryVersion (ClientPtr client)
swapl(&rep.majorVersion); swapl(&rep.majorVersion);
swapl(&rep.minorVersion); swapl(&rep.minorVersion);
} }
WriteToClient(client, sizeof(xRenderQueryVersionReply), (char *)&rep); WriteToClient(client, sizeof(xRenderQueryVersionReply), &rep);
return (client->noClientException); return (client->noClientException);
} }
...@@ -359,7 +359,7 @@ ProcRenderQueryPictFormats (ClientPtr client) ...@@ -359,7 +359,7 @@ ProcRenderQueryPictFormats (ClientPtr client)
swapl (&reply->numVisuals); swapl (&reply->numVisuals);
swapl (&reply->numSubpixel); swapl (&reply->numSubpixel);
} }
WriteToClient(client, rlength, (char *) reply); WriteToClient(client, rlength, reply);
free (reply); free (reply);
return client->noClientException; return client->noClientException;
} }
......
...@@ -281,12 +281,12 @@ SOFTWARE. ...@@ -281,12 +281,12 @@ SOFTWARE.
if ((pClient)->swapped) \ if ((pClient)->swapped) \
(*ReplySwapVector[((xReq *)(pClient)->requestBuffer)->reqType]) \ (*ReplySwapVector[((xReq *)(pClient)->requestBuffer)->reqType]) \
(pClient, (int)(size), pReply); \ (pClient, (int)(size), pReply); \
else (void) WriteToClient(pClient, (int)(size), (char *)(pReply)); } else WriteToClient(pClient, (int)(size), (pReply)); }
#define WriteSwappedDataToClient(pClient, size, pbuf) \ #define WriteSwappedDataToClient(pClient, size, pbuf) \
if ((pClient)->swapped) \ if ((pClient)->swapped) \
(*(pClient)->pSwapReplyFunc)(pClient, (int)(size), pbuf); \ (*(pClient)->pSwapReplyFunc)(pClient, (int)(size), pbuf); \
else (void) WriteToClient (pClient, (int)(size), (char *)(pbuf)); else WriteToClient (pClient, (int)(size), (pbuf));
typedef struct _TimeStamp *TimeStampPtr; typedef struct _TimeStamp *TimeStampPtr;
......
...@@ -181,7 +181,7 @@ AuthSecurityCheck ( ...@@ -181,7 +181,7 @@ AuthSecurityCheck (
if (client->swapped) if (client->swapped)
WriteSConnSetupPrefix(client, &csp); WriteSConnSetupPrefix(client, &csp);
else else
(void)WriteToClient(client, sz_xConnSetupPrefix, (char *) &csp); WriteToClient(client, sz_xConnSetupPrefix, &csp);
/* /*
* Next time the client sends the real auth data, we want * Next time the client sends the real auth data, we want
......
...@@ -1082,9 +1082,9 @@ ProcRRGetCrtcInfo(ClientPtr client) ...@@ -1082,9 +1082,9 @@ ProcRRGetCrtcInfo(ClientPtr client)
swaps(&rep.nOutput); swaps(&rep.nOutput);
swaps(&rep.nPossibleOutput); swaps(&rep.nPossibleOutput);
} }
WriteToClient(client, sizeof(xRRGetCrtcInfoReply), (char *) &rep); WriteToClient(client, sizeof(xRRGetCrtcInfoReply), &rep);
if (extraLen) { if (extraLen) {
WriteToClient(client, extraLen, (char *) extra); WriteToClient(client, extraLen, extra);
free(extra); free(extra);
} }
...@@ -1313,7 +1313,7 @@ ProcRRSetCrtcConfig(ClientPtr client) ...@@ -1313,7 +1313,7 @@ ProcRRSetCrtcConfig(ClientPtr client)
swapl(&rep.length); swapl(&rep.length);
swapl(&rep.newTimestamp); swapl(&rep.newTimestamp);
} }
WriteToClient(client, sizeof(xRRSetCrtcConfigReply), (char *) &rep); WriteToClient(client, sizeof(xRRSetCrtcConfigReply), &rep);
return Success; return Success;
} }
...@@ -1382,7 +1382,7 @@ ProcRRGetPanning(ClientPtr client) ...@@ -1382,7 +1382,7 @@ ProcRRGetPanning(ClientPtr client)
swaps(&rep.border_right); swaps(&rep.border_right);
swaps(&rep.border_bottom); swaps(&rep.border_bottom);
} }
WriteToClient(client, sizeof(xRRGetPanningReply), (char *) &rep); WriteToClient(client, sizeof(xRRGetPanningReply), &rep);
return Success; return Success;
} }
...@@ -1453,7 +1453,7 @@ ProcRRSetPanning(ClientPtr client) ...@@ -1453,7 +1453,7 @@ ProcRRSetPanning(ClientPtr client)
swapl(&rep.length); swapl(&rep.length);
swapl(&rep.newTimestamp); swapl(&rep.newTimestamp);
} }
WriteToClient(client, sizeof(xRRSetPanningReply), (char *) &rep); WriteToClient(client, sizeof(xRRSetPanningReply), &rep);
return Success; return Success;
} }
...@@ -1482,7 +1482,7 @@ ProcRRGetCrtcGammaSize(ClientPtr client) ...@@ -1482,7 +1482,7 @@ ProcRRGetCrtcGammaSize(ClientPtr client)
swapl(&reply.length); swapl(&reply.length);
swaps(&reply.size); swaps(&reply.size);
} }
WriteToClient(client, sizeof(xRRGetCrtcGammaSizeReply), (char *) &reply); WriteToClient(client, sizeof(xRRGetCrtcGammaSizeReply), &reply);
return Success; return Success;
} }
...@@ -1521,7 +1521,7 @@ ProcRRGetCrtcGamma(ClientPtr client) ...@@ -1521,7 +1521,7 @@ ProcRRGetCrtcGamma(ClientPtr client)
swapl(&reply.length); swapl(&reply.length);
swaps(&reply.size); swaps(&reply.size);
} }
WriteToClient(client, sizeof(xRRGetCrtcGammaReply), (char *) &reply); WriteToClient(client, sizeof(xRRGetCrtcGammaReply), &reply);
if (crtc->gammaSize) { if (crtc->gammaSize) {
memcpy(extra, crtc->gammaRed, len); memcpy(extra, crtc->gammaRed, len);
client->pSwapReplyFunc = (ReplySwapPtr) CopySwap16Write; client->pSwapReplyFunc = (ReplySwapPtr) CopySwap16Write;
...@@ -1688,7 +1688,7 @@ ProcRRGetCrtcTransform(ClientPtr client) ...@@ -1688,7 +1688,7 @@ ProcRRGetCrtcTransform(ClientPtr client)
swapl(&reply->length); swapl(&reply->length);
} }
WriteToClient(client, sizeof(xRRGetCrtcTransformReply) + nextra, WriteToClient(client, sizeof(xRRGetCrtcTransformReply) + nextra,
(char *) reply); reply);
free(reply); free(reply);
return Success; return Success;
} }
......
...@@ -67,7 +67,7 @@ ProcRRQueryVersion(ClientPtr client) ...@@ -67,7 +67,7 @@ ProcRRQueryVersion(ClientPtr client)
#ifndef NXAGENT_SERVER #ifndef NXAGENT_SERVER
WriteToClient(client, sizeof(xRRQueryVersionReply), &rep); WriteToClient(client, sizeof(xRRQueryVersionReply), &rep);
#else #else
WriteToClient(client, sizeof(xRRQueryVersionReply), (char *) &rep); WriteToClient(client, sizeof(xRRQueryVersionReply), &rep);
#endif #endif
return Success; return Success;
} }
......
...@@ -380,7 +380,7 @@ ProcRRCreateMode(ClientPtr client) ...@@ -380,7 +380,7 @@ ProcRRCreateMode(ClientPtr client)
swapl(&rep.length); swapl(&rep.length);
swapl(&rep.mode); swapl(&rep.mode);
} }
WriteToClient(client, sizeof(xRRCreateModeReply), (char *) &rep); WriteToClient(client, sizeof(xRRCreateModeReply), &rep);
/* Drop out reference to this mode */ /* Drop out reference to this mode */
RRModeDestroy(mode); RRModeDestroy(mode);
return Success; return Success;
......
...@@ -667,7 +667,7 @@ ProcRRGetMonitors(ClientPtr client) ...@@ -667,7 +667,7 @@ ProcRRGetMonitors(ClientPtr client)
swapl(&rep.nmonitors); swapl(&rep.nmonitors);
swapl(&rep.noutputs); swapl(&rep.noutputs);
} }
WriteToClient(client, sizeof(xRRGetMonitorsReply), (char *) &rep); WriteToClient(client, sizeof(xRRGetMonitorsReply), &rep);
client->pSwapReplyFunc = (ReplySwapPtr) CopySwap32Write; client->pSwapReplyFunc = (ReplySwapPtr) CopySwap32Write;
...@@ -696,7 +696,7 @@ ProcRRGetMonitors(ClientPtr client) ...@@ -696,7 +696,7 @@ ProcRRGetMonitors(ClientPtr client)
swapl(&info.heightInMillimeters); swapl(&info.heightInMillimeters);
} }
WriteToClient(client, sizeof(xRRMonitorInfo), (char *) &info); WriteToClient(client, sizeof(xRRMonitorInfo), &info);
WriteSwappedDataToClient(client, monitor->numOutputs * sizeof(RROutput), WriteSwappedDataToClient(client, monitor->numOutputs * sizeof(RROutput),
monitor->outputs); monitor->outputs);
} }
......
...@@ -534,9 +534,9 @@ ProcRRGetOutputInfo(ClientPtr client) ...@@ -534,9 +534,9 @@ ProcRRGetOutputInfo(ClientPtr client)
swaps(&rep.nClones); swaps(&rep.nClones);
swaps(&rep.nameLength); swaps(&rep.nameLength);
} }
WriteToClient(client, sizeof(xRRGetOutputInfoReply), (char *) &rep); WriteToClient(client, sizeof(xRRGetOutputInfoReply), &rep);
if (extraLen) { if (extraLen) {
WriteToClient(client, extraLen, (char *) extra); WriteToClient(client, extraLen, extra);
free(extra); free(extra);
} }
...@@ -662,7 +662,7 @@ ProcRRGetOutputPrimary(ClientPtr client) ...@@ -662,7 +662,7 @@ ProcRRGetOutputPrimary(ClientPtr client)
swapl(&rep.output); swapl(&rep.output);
} }
WriteToClient(client, sizeof(xRRGetOutputPrimaryReply), (char *) &rep); WriteToClient(client, sizeof(xRRGetOutputPrimaryReply), &rep);
return Success; return Success;
} }
...@@ -428,7 +428,7 @@ ProcRRListOutputProperties(ClientPtr client) ...@@ -428,7 +428,7 @@ ProcRRListOutputProperties(ClientPtr client)
swapl(&rep.length); swapl(&rep.length);
swaps(&rep.nAtoms); swaps(&rep.nAtoms);
} }
WriteToClient(client, sizeof(xRRListOutputPropertiesReply), (char *) &rep); WriteToClient(client, sizeof(xRRListOutputPropertiesReply), &rep);
if (numProps) { if (numProps) {
/* Copy property name atoms to reply buffer */ /* Copy property name atoms to reply buffer */
...@@ -482,7 +482,7 @@ ProcRRQueryOutputProperty(ClientPtr client) ...@@ -482,7 +482,7 @@ ProcRRQueryOutputProperty(ClientPtr client)
swaps(&rep.sequenceNumber); swaps(&rep.sequenceNumber);
swapl(&rep.length); swapl(&rep.length);
} }
WriteToClient(client, sizeof(xRRQueryOutputPropertyReply), (char *) &rep); WriteToClient(client, sizeof(xRRQueryOutputPropertyReply), &rep);
if (prop->num_valid) { if (prop->num_valid) {
memcpy(extra, prop->valid_values, prop->num_valid * sizeof(INT32)); memcpy(extra, prop->valid_values, prop->num_valid * sizeof(INT32));
client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write;
...@@ -646,7 +646,7 @@ ProcRRGetOutputProperty(ClientPtr client) ...@@ -646,7 +646,7 @@ ProcRRGetOutputProperty(ClientPtr client)
swapl(&reply.nItems); swapl(&reply.nItems);
} }
WriteToClient(client, sizeof(xRRGetOutputPropertyReply), WriteToClient(client, sizeof(xRRGetOutputPropertyReply),
(char *) &reply); &reply);
return Success; return Success;
} }
...@@ -675,7 +675,7 @@ ProcRRGetOutputProperty(ClientPtr client) ...@@ -675,7 +675,7 @@ ProcRRGetOutputProperty(ClientPtr client)
swapl(&reply.nItems); swapl(&reply.nItems);
} }
WriteToClient(client, sizeof(xRRGetOutputPropertyReply), WriteToClient(client, sizeof(xRRGetOutputPropertyReply),
(char *) &reply); &reply);
return Success; return Success;
} }
...@@ -728,7 +728,7 @@ ProcRRGetOutputProperty(ClientPtr client) ...@@ -728,7 +728,7 @@ ProcRRGetOutputProperty(ClientPtr client)
swapl(&reply.bytesAfter); swapl(&reply.bytesAfter);
swapl(&reply.nItems); swapl(&reply.nItems);
} }
WriteToClient(client, sizeof(xGenericReply), (char *) &reply); WriteToClient(client, sizeof(xGenericReply), &reply);
if (len) { if (len) {
memcpy(extra, (char *) prop_value->data + ind, len); memcpy(extra, (char *) prop_value->data + ind, len);
switch (reply.format) { switch (reply.format) {
......
...@@ -147,10 +147,10 @@ ProcRRGetProviders(ClientPtr client) ...@@ -147,10 +147,10 @@ ProcRRGetProviders(ClientPtr client)
swapl(&rep.timestamp); swapl(&rep.timestamp);
swaps(&rep.nProviders); swaps(&rep.nProviders);
} }
WriteToClient(client, sizeof(xRRGetProvidersReply), (char *) &rep); WriteToClient(client, sizeof(xRRGetProvidersReply), &rep);
if (extraLen) if (extraLen)
{ {
WriteToClient(client, extraLen, (char *) extra); WriteToClient(client, extraLen, extra);
free(extra); free(extra);
} }
return Success; return Success;
...@@ -289,10 +289,10 @@ ProcRRGetProviderInfo(ClientPtr client) ...@@ -289,10 +289,10 @@ ProcRRGetProviderInfo(ClientPtr client)
swaps(&rep.nOutputs); swaps(&rep.nOutputs);
swaps(&rep.nameLength); swaps(&rep.nameLength);
} }
WriteToClient(client, sizeof(xRRGetProviderInfoReply), (char *) &rep); WriteToClient(client, sizeof(xRRGetProviderInfoReply), &rep);
if (extraLen) if (extraLen)
{ {
WriteToClient(client, extraLen, (char *) extra); WriteToClient(client, extraLen, extra);
free(extra); free(extra);
} }
return Success; return Success;
......
...@@ -432,7 +432,7 @@ ProcRRListProviderProperties(ClientPtr client) ...@@ -432,7 +432,7 @@ ProcRRListProviderProperties(ClientPtr client)
*temppAtoms++ = prop->propertyName; *temppAtoms++ = prop->propertyName;
WriteToClient(client, sizeof(xRRListProviderPropertiesReply), WriteToClient(client, sizeof(xRRListProviderPropertiesReply),
(char *) &rep); &rep);
if (numProps) { if (numProps) {
client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write;
WriteSwappedDataToClient(client, numProps * sizeof(Atom), pAtoms); WriteSwappedDataToClient(client, numProps * sizeof(Atom), pAtoms);
...@@ -479,7 +479,7 @@ ProcRRQueryProviderProperty(ClientPtr client) ...@@ -479,7 +479,7 @@ ProcRRQueryProviderProperty(ClientPtr client)
swaps(&rep.sequenceNumber); swaps(&rep.sequenceNumber);
swapl(&rep.length); swapl(&rep.length);
} }
WriteToClient(client, sizeof(xRRQueryProviderPropertyReply), (char *) &rep); WriteToClient(client, sizeof(xRRQueryProviderPropertyReply), &rep);
if (prop->num_valid) { if (prop->num_valid) {
memcpy(extra, prop->valid_values, prop->num_valid * sizeof(INT32)); memcpy(extra, prop->valid_values, prop->num_valid * sizeof(INT32));
client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write;
...@@ -642,7 +642,7 @@ ProcRRGetProviderProperty(ClientPtr client) ...@@ -642,7 +642,7 @@ ProcRRGetProviderProperty(ClientPtr client)
swapl(&reply.nItems); swapl(&reply.nItems);
} }
WriteToClient(client, sizeof(xRRGetProviderPropertyReply), WriteToClient(client, sizeof(xRRGetProviderPropertyReply),
(char *) &reply); &reply);
return Success; return Success;
} }
...@@ -671,7 +671,7 @@ ProcRRGetProviderProperty(ClientPtr client) ...@@ -671,7 +671,7 @@ ProcRRGetProviderProperty(ClientPtr client)
swapl(&reply.nItems); swapl(&reply.nItems);
} }
WriteToClient(client, sizeof(xRRGetProviderPropertyReply), WriteToClient(client, sizeof(xRRGetProviderPropertyReply),
(char *) &reply); &reply);
return Success; return Success;
} }
...@@ -724,7 +724,7 @@ ProcRRGetProviderProperty(ClientPtr client) ...@@ -724,7 +724,7 @@ ProcRRGetProviderProperty(ClientPtr client)
swapl(&reply.bytesAfter); swapl(&reply.bytesAfter);
swapl(&reply.nItems); swapl(&reply.nItems);
} }
WriteToClient(client, sizeof(xGenericReply), (char *) &reply); WriteToClient(client, sizeof(xGenericReply), &reply);
if (len) { if (len) {
memcpy(extra, (char *) prop_value->data + ind, len); memcpy(extra, (char *) prop_value->data + ind, len);
switch (reply.format) { switch (reply.format) {
......
...@@ -251,7 +251,7 @@ ProcRRGetScreenSizeRange(ClientPtr client) ...@@ -251,7 +251,7 @@ ProcRRGetScreenSizeRange(ClientPtr client)
swaps(&rep.maxWidth); swaps(&rep.maxWidth);
swaps(&rep.maxHeight); swaps(&rep.maxHeight);
} }
WriteToClient(client, sizeof(xRRGetScreenSizeRangeReply), (char *) &rep); WriteToClient(client, sizeof(xRRGetScreenSizeRangeReply), &rep);
return Success; return Success;
} }
...@@ -494,9 +494,9 @@ rrGetMultiScreenResources(ClientPtr client, Bool query, ScreenPtr pScreen) ...@@ -494,9 +494,9 @@ rrGetMultiScreenResources(ClientPtr client, Bool query, ScreenPtr pScreen)
swaps(&rep.nModes); swaps(&rep.nModes);
swaps(&rep.nbytesNames); swaps(&rep.nbytesNames);
} }
WriteToClient(client, sizeof(xRRGetScreenResourcesReply), (char *) &rep); WriteToClient(client, sizeof(xRRGetScreenResourcesReply), &rep);
if (extraLen) { if (extraLen) {
WriteToClient(client, extraLen, (char *) extra); WriteToClient(client, extraLen, extra);
free(extra); free(extra);
} }
return Success; return Success;
...@@ -662,9 +662,9 @@ rrGetScreenResources(ClientPtr client, Bool query) ...@@ -662,9 +662,9 @@ rrGetScreenResources(ClientPtr client, Bool query)
swaps(&rep.nbytesNames); swaps(&rep.nbytesNames);
} }
WriteToClient(client, sizeof(xRRGetScreenResourcesReply), WriteToClient(client, sizeof(xRRGetScreenResourcesReply),
(char *) (char *) &rep); (char *) &rep);
if (extraLen) { if (extraLen) {
WriteToClient(client, extraLen, (char *) (char *) extra); WriteToClient(client, extraLen, extra);
free(extra); free(extra);
} }
return Success; return Success;
...@@ -927,9 +927,9 @@ ProcRRGetScreenInfo(ClientPtr client) ...@@ -927,9 +927,9 @@ ProcRRGetScreenInfo(ClientPtr client)
swaps(&rep.rate); swaps(&rep.rate);
swaps(&rep.nrateEnts); swaps(&rep.nrateEnts);
} }
WriteToClient(client, sizeof(xRRGetScreenInfoReply), (char *) &rep); WriteToClient(client, sizeof(xRRGetScreenInfoReply), &rep);
if (extraLen) { if (extraLen) {
WriteToClient(client, extraLen, (char *) extra); WriteToClient(client, extraLen, extra);
free(extra); free(extra);
} }
return Success; return Success;
...@@ -1169,7 +1169,7 @@ ProcRRSetScreenConfig(ClientPtr client) ...@@ -1169,7 +1169,7 @@ ProcRRSetScreenConfig(ClientPtr client)
swapl(&rep.newConfigTimestamp); swapl(&rep.newConfigTimestamp);
swapl(&rep.root); swapl(&rep.root);
} }
WriteToClient(client, sizeof(xRRSetScreenConfigReply), (char *) &rep); WriteToClient(client, sizeof(xRRSetScreenConfigReply), &rep);
return Success; return Success;
} }
......
...@@ -123,7 +123,7 @@ ProcRRXineramaQueryVersion(ClientPtr client) ...@@ -123,7 +123,7 @@ ProcRRXineramaQueryVersion(ClientPtr client)
swaps(&rep.majorVersion); swaps(&rep.majorVersion);
swaps(&rep.minorVersion); swaps(&rep.minorVersion);
} }
WriteToClient(client, sizeof(xPanoramiXQueryVersionReply), (char *) &rep); WriteToClient(client, sizeof(xPanoramiXQueryVersionReply), &rep);
return Success; return Success;
} }
...@@ -168,7 +168,7 @@ ProcRRXineramaGetState(ClientPtr client) ...@@ -168,7 +168,7 @@ ProcRRXineramaGetState(ClientPtr client)
swapl(&rep.length); swapl(&rep.length);
swapl(&rep.window); swapl(&rep.window);
} }
WriteToClient(client, sizeof(xPanoramiXGetStateReply), (char *) &rep); WriteToClient(client, sizeof(xPanoramiXGetStateReply), &rep);
return Success; return Success;
} }
...@@ -215,7 +215,7 @@ ProcRRXineramaGetScreenCount(ClientPtr client) ...@@ -215,7 +215,7 @@ ProcRRXineramaGetScreenCount(ClientPtr client)
swapl(&rep.length); swapl(&rep.length);
swapl(&rep.window); swapl(&rep.window);
} }
WriteToClient(client, sizeof(xPanoramiXGetScreenCountReply), (char *) &rep); WriteToClient(client, sizeof(xPanoramiXGetScreenCountReply), &rep);
return Success; return Success;
} }
...@@ -259,7 +259,7 @@ ProcRRXineramaGetScreenSize(ClientPtr client) ...@@ -259,7 +259,7 @@ ProcRRXineramaGetScreenSize(ClientPtr client)
swapl(&rep.window); swapl(&rep.window);
swapl(&rep.screen); swapl(&rep.screen);
} }
WriteToClient(client, sizeof(xPanoramiXGetScreenSizeReply), (char *) &rep); WriteToClient(client, sizeof(xPanoramiXGetScreenSizeReply), &rep);
return Success; return Success;
} }
...@@ -281,7 +281,7 @@ ProcRRXineramaIsActive(ClientPtr client) ...@@ -281,7 +281,7 @@ ProcRRXineramaIsActive(ClientPtr client)
swapl(&rep.length); swapl(&rep.length);
swapl(&rep.state); swapl(&rep.state);
} }
WriteToClient(client, sizeof(xXineramaIsActiveReply), (char *) &rep); WriteToClient(client, sizeof(xXineramaIsActiveReply), &rep);
return Success; return Success;
} }
...@@ -295,7 +295,7 @@ RRXineramaWriteMonitor(ClientPtr client, RRMonitorPtr monitor) ...@@ -295,7 +295,7 @@ RRXineramaWriteMonitor(ClientPtr client, RRMonitorPtr monitor)
scratch.width = monitor->geometry.box.x2 - monitor->geometry.box.x1; scratch.width = monitor->geometry.box.x2 - monitor->geometry.box.x1;
scratch.height = monitor->geometry.box.y2 - monitor->geometry.box.y1; scratch.height = monitor->geometry.box.y2 - monitor->geometry.box.y1;
WriteToClient(client, sz_XineramaScreenInfo, (char *) &scratch); WriteToClient(client, sz_XineramaScreenInfo, &scratch);
} }
int int
...@@ -326,7 +326,7 @@ ProcRRXineramaQueryScreens(ClientPtr client) ...@@ -326,7 +326,7 @@ ProcRRXineramaQueryScreens(ClientPtr client)
swapl(&rep.length); swapl(&rep.length);
swapl(&rep.number); swapl(&rep.number);
} }
WriteToClient(client, sizeof(xXineramaQueryScreensReply), (char *) &rep); WriteToClient(client, sizeof(xXineramaQueryScreensReply), &rep);
for (m = 0; m < nmonitors; m++) for (m = 0; m < nmonitors; m++)
RRXineramaWriteMonitor(client, &monitors[m]); RRXineramaWriteMonitor(client, &monitors[m]);
......
...@@ -257,9 +257,9 @@ RecordFlushReplyBuffer( ...@@ -257,9 +257,9 @@ RecordFlushReplyBuffer(
(char *)pContext->replyBuffer); (char *)pContext->replyBuffer);
pContext->numBufBytes = 0; pContext->numBufBytes = 0;
if (len1) if (len1)
WriteToClient(pContext->pRecordingClient, len1, (char *)data1); WriteToClient(pContext->pRecordingClient, len1, data1);
if (len2) if (len2)
WriteToClient(pContext->pRecordingClient, len2, (char *)data2); WriteToClient(pContext->pRecordingClient, len2, data2);
} /* RecordFlushReplyBuffer */ } /* RecordFlushReplyBuffer */
...@@ -2009,8 +2009,8 @@ ProcRecordQueryVersion(client) ...@@ -2009,8 +2009,8 @@ ProcRecordQueryVersion(client)
swaps(&rep.majorVersion); swaps(&rep.majorVersion);
swaps(&rep.minorVersion); swaps(&rep.minorVersion);
} }
(void)WriteToClient(client, sizeof(xRecordQueryVersionReply), WriteToClient(client, sizeof(xRecordQueryVersionReply),
(char *)&rep); &rep);
return (client->noClientException); return (client->noClientException);
} /* ProcRecordQueryVersion */ } /* ProcRecordQueryVersion */
...@@ -2436,8 +2436,8 @@ ProcRecordGetContext(client) ...@@ -2436,8 +2436,8 @@ ProcRecordGetContext(client)
swapl(&rep.length); swapl(&rep.length);
swapl(&rep.nClients); swapl(&rep.nClients);
} }
(void)WriteToClient(client, sizeof(xRecordGetContextReply), WriteToClient(client, sizeof(xRecordGetContextReply),
(char *)&rep); &rep);
/* write all the CLIENT_INFOs */ /* write all the CLIENT_INFOs */
...@@ -2456,7 +2456,7 @@ ProcRecordGetContext(client) ...@@ -2456,7 +2456,7 @@ ProcRecordGetContext(client)
{ {
rci.clientResource = pRCAP->pClientIDs[i]; rci.clientResource = pRCAP->pClientIDs[i];
if (client->swapped) swapl(&rci.clientResource); if (client->swapped) swapl(&rci.clientResource);
WriteToClient(client, sizeof(xRecordClientInfo), (char *)&rci); WriteToClient(client, sizeof(xRecordClientInfo), &rci);
WriteToClient(client, sizeof(xRecordRange) * pri->nRanges, WriteToClient(client, sizeof(xRecordRange) * pri->nRanges,
(char *)pri->pRanges); (char *)pri->pRanges);
} }
......
...@@ -303,7 +303,7 @@ ProcRenderQueryVersion (ClientPtr client) ...@@ -303,7 +303,7 @@ ProcRenderQueryVersion (ClientPtr client)
swapl(&rep.majorVersion); swapl(&rep.majorVersion);
swapl(&rep.minorVersion); swapl(&rep.minorVersion);
} }
WriteToClient(client, sizeof(xRenderQueryVersionReply), (char *)&rep); WriteToClient(client, sizeof(xRenderQueryVersionReply), &rep);
return (client->noClientException); return (client->noClientException);
} }
#endif /* NXAGENT_SERVER */ #endif /* NXAGENT_SERVER */
...@@ -551,7 +551,7 @@ ProcRenderQueryPictFormats (ClientPtr client) ...@@ -551,7 +551,7 @@ ProcRenderQueryPictFormats (ClientPtr client)
swapl (&reply->numVisuals); swapl (&reply->numVisuals);
swapl (&reply->numSubpixel); swapl (&reply->numSubpixel);
} }
WriteToClient(client, rlength, (char *) reply); WriteToClient(client, rlength, reply);
free (reply); free (reply);
return client->noClientException; return client->noClientException;
} }
...@@ -616,7 +616,7 @@ ProcRenderQueryPictIndexValues (ClientPtr client) ...@@ -616,7 +616,7 @@ ProcRenderQueryPictIndexValues (ClientPtr client)
swapl (&reply->numIndexValues); swapl (&reply->numIndexValues);
} }
WriteToClient(client, rlength, (char *) reply); WriteToClient(client, rlength, reply);
free(reply); free(reply);
return (client->noClientException); return (client->noClientException);
} }
...@@ -1816,7 +1816,7 @@ ProcRenderQueryFilters (ClientPtr client) ...@@ -1816,7 +1816,7 @@ ProcRenderQueryFilters (ClientPtr client)
swapl(&reply->numAliases); swapl(&reply->numAliases);
swapl(&reply->numFilters); swapl(&reply->numFilters);
} }
WriteToClient(client, total_bytes, (char *) reply); WriteToClient(client, total_bytes, reply);
free (reply); free (reply);
return(client->noClientException); return(client->noClientException);
......
...@@ -339,7 +339,7 @@ ProcXFixesGetCursorImage (ClientPtr client) ...@@ -339,7 +339,7 @@ ProcXFixesGetCursorImage (ClientPtr client)
swapl(&rep->cursorSerial); swapl(&rep->cursorSerial);
SwapLongs(image, npixels); SwapLongs(image, npixels);
} }
(void) WriteToClient(client, sizeof (xXFixesGetCursorImageReply) + WriteToClient(client, sizeof (xXFixesGetCursorImageReply) +
(npixels << 2), (char *) rep); (npixels << 2), (char *) rep);
free (rep); free (rep);
return client->noClientException; return client->noClientException;
...@@ -413,7 +413,7 @@ ProcXFixesGetCursorName (ClientPtr client) ...@@ -413,7 +413,7 @@ ProcXFixesGetCursorName (ClientPtr client)
swaps(&reply.nbytes); swaps(&reply.nbytes);
} }
WriteReplyToClient(client, sizeof(xXFixesGetCursorNameReply), &reply); WriteReplyToClient(client, sizeof(xXFixesGetCursorNameReply), &reply);
(void)WriteToClient(client, len, str); WriteToClient(client, len, str);
return(client->noClientException); return(client->noClientException);
} }
...@@ -488,7 +488,7 @@ ProcXFixesGetCursorImageAndName (ClientPtr client) ...@@ -488,7 +488,7 @@ ProcXFixesGetCursorImageAndName (ClientPtr client)
swaps(&rep->nbytes); swaps(&rep->nbytes);
SwapLongs(image, npixels); SwapLongs(image, npixels);
} }
(void) WriteToClient(client, sizeof (xXFixesGetCursorImageAndNameReply) + WriteToClient(client, sizeof (xXFixesGetCursorImageAndNameReply) +
(npixels << 2) + nbytesRound, (char *) rep); (npixels << 2) + nbytesRound, (char *) rep);
free (rep); free (rep);
return client->noClientException; return client->noClientException;
......
...@@ -592,8 +592,8 @@ ProcXFixesFetchRegion (ClientPtr client) ...@@ -592,8 +592,8 @@ ProcXFixesFetchRegion (ClientPtr client)
swaps(&reply->height); swaps(&reply->height);
SwapShorts((INT16 *) pRect, nBox * 4); SwapShorts((INT16 *) pRect, nBox * 4);
} }
(void) WriteToClient(client, sizeof (xXFixesFetchRegionReply) + WriteToClient(client, sizeof (xXFixesFetchRegionReply) +
nBox * sizeof (xRectangle), (char *) reply); nBox * sizeof (xRectangle), reply);
free (reply); free (reply);
return (client->noClientException); return (client->noClientException);
} }
......
...@@ -65,7 +65,7 @@ ProcXFixesQueryVersion(ClientPtr client) ...@@ -65,7 +65,7 @@ ProcXFixesQueryVersion(ClientPtr client)
swapl(&rep.majorVersion); swapl(&rep.majorVersion);
swapl(&rep.minorVersion); swapl(&rep.minorVersion);
} }
WriteToClient(client, sizeof(xXFixesQueryVersionReply), (char *)&rep); WriteToClient(client, sizeof(xXFixesQueryVersionReply), &rep);
return(client->noClientException); return(client->noClientException);
} }
......
...@@ -204,7 +204,7 @@ ProcXkbUseExtension(ClientPtr client) ...@@ -204,7 +204,7 @@ ProcXkbUseExtension(ClientPtr client)
swaps(&rep.serverMajor); swaps(&rep.serverMajor);
swaps(&rep.serverMinor); swaps(&rep.serverMinor);
} }
WriteToClient(client,SIZEOF(xkbUseExtensionReply), (char *)&rep); WriteToClient(client,SIZEOF(xkbUseExtensionReply), &rep);
return client->noClientException; return client->noClientException;
} }
...@@ -537,7 +537,7 @@ ProcXkbGetState(ClientPtr client) ...@@ -537,7 +537,7 @@ ProcXkbGetState(ClientPtr client)
swaps(&rep.sequenceNumber); swaps(&rep.sequenceNumber);
swaps(&rep.ptrBtnState); swaps(&rep.ptrBtnState);
} }
WriteToClient(client, SIZEOF(xkbGetStateReply), (char *)&rep); WriteToClient(client, SIZEOF(xkbGetStateReply), &rep);
return client->noClientException; return client->noClientException;
} }
...@@ -671,7 +671,7 @@ ProcXkbGetControls(ClientPtr client) ...@@ -671,7 +671,7 @@ ProcXkbGetControls(ClientPtr client)
swaps(&rep.axtOptsValues); swaps(&rep.axtOptsValues);
swaps(&rep.axOptions); swaps(&rep.axOptions);
} }
WriteToClient(client, SIZEOF(xkbGetControlsReply), (char *)&rep); WriteToClient(client, SIZEOF(xkbGetControlsReply), &rep);
return(client->noClientException); return(client->noClientException);
} }
...@@ -1345,7 +1345,7 @@ char *desc,*start; ...@@ -1345,7 +1345,7 @@ char *desc,*start;
swaps(&rep->totalSyms); swaps(&rep->totalSyms);
swaps(&rep->totalActs); swaps(&rep->totalActs);
} }
WriteToClient(client, (i=SIZEOF(xkbGetMapReply)), (char *)rep); WriteToClient(client, (i=SIZEOF(xkbGetMapReply)), rep);
WriteToClient(client, len, start); WriteToClient(client, len, start);
DEALLOCATE_LOCAL((char *)start); DEALLOCATE_LOCAL((char *)start);
return client->noClientException; return client->noClientException;
...@@ -2536,7 +2536,7 @@ int size; ...@@ -2536,7 +2536,7 @@ int size;
swaps(&rep->nTotalSI); swaps(&rep->nTotalSI);
} }
WriteToClient(client, SIZEOF(xkbGetCompatMapReply), (char *)rep); WriteToClient(client, SIZEOF(xkbGetCompatMapReply), rep);
if (data) { if (data) {
WriteToClient(client, size, data); WriteToClient(client, size, data);
DEALLOCATE_LOCAL((char *)data); DEALLOCATE_LOCAL((char *)data);
...@@ -2750,7 +2750,7 @@ ProcXkbGetIndicatorState(ClientPtr client) ...@@ -2750,7 +2750,7 @@ ProcXkbGetIndicatorState(ClientPtr client)
swaps(&rep.sequenceNumber); swaps(&rep.sequenceNumber);
swapl(&rep.state); swapl(&rep.state);
} }
WriteToClient(client, SIZEOF(xkbGetIndicatorStateReply), (char *)&rep); WriteToClient(client, SIZEOF(xkbGetIndicatorStateReply), &rep);
return client->noClientException; return client->noClientException;
} }
...@@ -2821,9 +2821,9 @@ register unsigned bit; ...@@ -2821,9 +2821,9 @@ register unsigned bit;
swapl(&rep->which); swapl(&rep->which);
swapl(&rep->realIndicators); swapl(&rep->realIndicators);
} }
WriteToClient(client, SIZEOF(xkbGetIndicatorMapReply), (char *)rep); WriteToClient(client, SIZEOF(xkbGetIndicatorMapReply), rep);
if (map) { if (map) {
WriteToClient(client, length, (char *)map); WriteToClient(client, length, map);
DEALLOCATE_LOCAL((char *)map); DEALLOCATE_LOCAL((char *)map);
} }
return client->noClientException; return client->noClientException;
...@@ -3025,7 +3025,7 @@ ProcXkbGetNamedIndicator(ClientPtr client) ...@@ -3025,7 +3025,7 @@ ProcXkbGetNamedIndicator(ClientPtr client)
swapl(&rep.ctrls); swapl(&rep.ctrls);
} }
WriteToClient(client,SIZEOF(xkbGetNamedIndicatorReply), (char *)&rep); WriteToClient(client,SIZEOF(xkbGetNamedIndicatorReply), &rep);
if (!supported) { if (!supported) {
xkbExtensionDeviceNotify edev; xkbExtensionDeviceNotify edev;
...@@ -3432,7 +3432,7 @@ char * desc; ...@@ -3432,7 +3432,7 @@ char * desc;
ErrorF("BOGUS LENGTH in write names, expected %d, got %ld\n", ErrorF("BOGUS LENGTH in write names, expected %d, got %ld\n",
length, (unsigned long)(desc-start)); length, (unsigned long)(desc-start));
} }
WriteToClient(client, SIZEOF(xkbGetNamesReply), (char *)rep); WriteToClient(client, SIZEOF(xkbGetNamesReply), rep);
WriteToClient(client, length, start); WriteToClient(client, length, start);
DEALLOCATE_LOCAL((char *)start); DEALLOCATE_LOCAL((char *)start);
return client->noClientException; return client->noClientException;
...@@ -4359,7 +4359,7 @@ XkbSendGeometry( ClientPtr client, ...@@ -4359,7 +4359,7 @@ XkbSendGeometry( ClientPtr client,
swaps(&rep->nDoodads); swaps(&rep->nDoodads);
swaps(&rep->nKeyAliases); swaps(&rep->nKeyAliases);
} }
WriteToClient(client, SIZEOF(xkbGetGeometryReply), (char *)rep); WriteToClient(client, SIZEOF(xkbGetGeometryReply), rep);
if (len>0) if (len>0)
WriteToClient(client, len, start); WriteToClient(client, len, start);
if (start!=NULL) if (start!=NULL)
...@@ -4977,7 +4977,7 @@ ProcXkbPerClientFlags(ClientPtr client) ...@@ -4977,7 +4977,7 @@ ProcXkbPerClientFlags(ClientPtr client)
swapl(&rep.autoCtrls); swapl(&rep.autoCtrls);
swapl(&rep.autoCtrlValues); swapl(&rep.autoCtrlValues);
} }
WriteToClient(client,SIZEOF(xkbPerClientFlagsReply), (char *)&rep); WriteToClient(client,SIZEOF(xkbPerClientFlagsReply), &rep);
return client->noClientException; return client->noClientException;
} }
...@@ -5106,9 +5106,9 @@ ProcXkbListComponents(ClientPtr client) ...@@ -5106,9 +5106,9 @@ ProcXkbListComponents(ClientPtr client)
swaps(&rep.nGeometries); swaps(&rep.nGeometries);
swaps(&rep.extra); swaps(&rep.extra);
} }
WriteToClient(client,SIZEOF(xkbListComponentsReply),(char *)&rep); WriteToClient(client,SIZEOF(xkbListComponentsReply),&rep);
if (list.nPool && list.pool) { if (list.nPool && list.pool) {
WriteToClient(client,XkbPaddedSize(list.nPool), (char *)list.pool); WriteToClient(client,XkbPaddedSize(list.nPool), list.pool);
_XkbFree(list.pool); _XkbFree(list.pool);
list.pool= NULL; list.pool= NULL;
} }
...@@ -5368,7 +5368,7 @@ ProcXkbGetKbdByName(ClientPtr client) ...@@ -5368,7 +5368,7 @@ ProcXkbGetKbdByName(ClientPtr client)
swaps(&rep.found); swaps(&rep.found);
swaps(&rep.reported); swaps(&rep.reported);
} }
WriteToClient(client,SIZEOF(xkbGetKbdByNameReply), (char *)&rep); WriteToClient(client,SIZEOF(xkbGetKbdByNameReply), &rep);
if (reported&(XkbGBN_SymbolsMask|XkbGBN_TypesMask)) if (reported&(XkbGBN_SymbolsMask|XkbGBN_TypesMask))
XkbSendMap(client,finfo.xkb,&mrep); XkbSendMap(client,finfo.xkb,&mrep);
if (reported&XkbGBN_CompatMapMask) if (reported&XkbGBN_CompatMapMask)
...@@ -5559,7 +5559,7 @@ int length; ...@@ -5559,7 +5559,7 @@ int length;
swapl(&wire.physIndicators); swapl(&wire.physIndicators);
swapl(&wire.state); swapl(&wire.state);
} }
WriteToClient(client,SIZEOF(xkbDeviceLedsWireDesc),(char *)&wire); WriteToClient(client,SIZEOF(xkbDeviceLedsWireDesc), &wire);
length+= SIZEOF(xkbDeviceLedsWireDesc); length+= SIZEOF(xkbDeviceLedsWireDesc);
if (sli->namesPresent|sli->mapsPresent) { if (sli->namesPresent|sli->mapsPresent) {
register unsigned i,bit; register unsigned i,bit;
...@@ -5571,7 +5571,7 @@ int length; ...@@ -5571,7 +5571,7 @@ int length;
if (client->swapped) { if (client->swapped) {
swapl(&awire); swapl(&awire);
} }
WriteToClient(client,4,(char *)&awire); WriteToClient(client,4, &awire);
length+= 4; length+= 4;
} }
} }
...@@ -5756,7 +5756,7 @@ char * str; ...@@ -5756,7 +5756,7 @@ char * str;
swapl((int *)&rep.type); swapl((int *)&rep.type);
} }
WriteToClient(client,SIZEOF(xkbGetDeviceInfoReply), (char *)&rep); WriteToClient(client,SIZEOF(xkbGetDeviceInfoReply), &rep);
str= (char*) ALLOCATE_LOCAL(nameLen); str= (char*) ALLOCATE_LOCAL(nameLen);
if (!str) if (!str)
...@@ -5771,7 +5771,7 @@ char * str; ...@@ -5771,7 +5771,7 @@ char * str;
xkbActionWireDesc * awire; xkbActionWireDesc * awire;
sz= rep.nBtnsRtrn*SIZEOF(xkbActionWireDesc); sz= rep.nBtnsRtrn*SIZEOF(xkbActionWireDesc);
awire= (xkbActionWireDesc *)&dev->button->xkb_acts[rep.firstBtnRtrn]; awire= (xkbActionWireDesc *)&dev->button->xkb_acts[rep.firstBtnRtrn];
WriteToClient(client,sz,(char *)awire); WriteToClient(client,sz, awire);
length-= sz; length-= sz;
} }
if (nDeviceLedFBs>0) { if (nDeviceLedFBs>0) {
...@@ -6113,7 +6113,7 @@ xkbSetDebuggingFlagsReply rep; ...@@ -6113,7 +6113,7 @@ xkbSetDebuggingFlagsReply rep;
swapl(&rep.supportedFlags); swapl(&rep.supportedFlags);
swapl(&rep.supportedCtrls); swapl(&rep.supportedCtrls);
} }
WriteToClient(client,SIZEOF(xkbSetDebuggingFlagsReply), (char *)&rep); WriteToClient(client,SIZEOF(xkbSetDebuggingFlagsReply), &rep);
return client->noClientException; return client->noClientException;
} }
......
...@@ -71,7 +71,7 @@ CARD16 changed; ...@@ -71,7 +71,7 @@ CARD16 changed;
swapl(&pNKN->time); swapl(&pNKN->time);
swaps(&pNKN->changed); swaps(&pNKN->changed);
} }
WriteToClient(clients[i],sizeof(xEvent),(char *)pNKN); WriteToClient(clients[i],sizeof(xEvent), pNKN);
if (changed&XkbNKN_KeycodesMask) { if (changed&XkbNKN_KeycodesMask) {
clients[i]->minKC= pNKN->minKeyCode; clients[i]->minKC= pNKN->minKeyCode;
clients[i]->maxKC= pNKN->maxKeyCode; clients[i]->maxKC= pNKN->maxKeyCode;
...@@ -88,9 +88,9 @@ CARD16 changed; ...@@ -88,9 +88,9 @@ CARD16 changed;
if (clients[i]->swapped) { if (clients[i]->swapped) {
swaps(&event.u.u.sequenceNumber); swaps(&event.u.u.sequenceNumber);
} }
WriteToClient(clients[i],SIZEOF(xEvent), (char *)&event); WriteToClient(clients[i],SIZEOF(xEvent), &event);
event.u.mappingNotify.request= MappingModifier; event.u.mappingNotify.request= MappingModifier;
WriteToClient(clients[i],SIZEOF(xEvent), (char *)&event); WriteToClient(clients[i],SIZEOF(xEvent), &event);
} }
} }
return; return;
...@@ -149,7 +149,7 @@ register CARD16 changed,bState; ...@@ -149,7 +149,7 @@ register CARD16 changed,bState;
swaps(&pSN->changed); swaps(&pSN->changed);
swaps(&pSN->ptrBtnState); swaps(&pSN->ptrBtnState);
} }
WriteToClient(interest->client, sizeof(xEvent), (char *)pSN); WriteToClient(interest->client, sizeof(xEvent), pSN);
} }
interest= interest->next; interest= interest->next;
} }
...@@ -193,7 +193,7 @@ CARD16 changed; ...@@ -193,7 +193,7 @@ CARD16 changed;
swapl(&pMN->time); swapl(&pMN->time);
swaps(&pMN->changed); swaps(&pMN->changed);
} }
WriteToClient(clients[i],sizeof(xEvent),(char *)pMN); WriteToClient(clients[i],sizeof(xEvent), pMN);
} }
} }
return; return;
...@@ -317,7 +317,7 @@ Time time = 0; ...@@ -317,7 +317,7 @@ Time time = 0;
swapl(&pCN->enabledControlChanges); swapl(&pCN->enabledControlChanges);
swapl(&pCN->time); swapl(&pCN->time);
} }
WriteToClient(interest->client, sizeof(xEvent), (char *)pCN); WriteToClient(interest->client, sizeof(xEvent), pCN);
} }
interest= interest->next; interest= interest->next;
} }
...@@ -364,7 +364,7 @@ CARD32 state,changed; ...@@ -364,7 +364,7 @@ CARD32 state,changed;
swapl(&pEv->changed); swapl(&pEv->changed);
swapl(&pEv->state); swapl(&pEv->state);
} }
WriteToClient(interest->client, sizeof(xEvent), (char *)pEv); WriteToClient(interest->client, sizeof(xEvent), pEv);
} }
interest= interest->next; interest= interest->next;
} }
...@@ -448,7 +448,7 @@ XID winID = 0; ...@@ -448,7 +448,7 @@ XID winID = 0;
swapl(&bn.name); swapl(&bn.name);
swapl(&bn.window); swapl(&bn.window);
} }
WriteToClient(interest->client, sizeof(xEvent), (char *)&bn); WriteToClient(interest->client, sizeof(xEvent), &bn);
} }
interest= interest->next; interest= interest->next;
} }
...@@ -492,7 +492,7 @@ CARD16 sk_delay,db_delay; ...@@ -492,7 +492,7 @@ CARD16 sk_delay,db_delay;
swaps(&pEv->slowKeysDelay); swaps(&pEv->slowKeysDelay);
swaps(&pEv->debounceDelay); swaps(&pEv->debounceDelay);
} }
WriteToClient(interest->client, sizeof(xEvent), (char *)pEv); WriteToClient(interest->client, sizeof(xEvent), pEv);
} }
interest= interest->next; interest= interest->next;
} }
...@@ -540,7 +540,7 @@ CARD32 changedIndicators; ...@@ -540,7 +540,7 @@ CARD32 changedIndicators;
swapl(&pEv->changedIndicators); swapl(&pEv->changedIndicators);
swaps(&pEv->changedVirtualMods); swaps(&pEv->changedVirtualMods);
} }
WriteToClient(interest->client, sizeof(xEvent), (char *)pEv); WriteToClient(interest->client, sizeof(xEvent), pEv);
} }
interest= interest->next; interest= interest->next;
} }
...@@ -587,7 +587,7 @@ CARD16 firstSI = 0, nSI = 0, nTotalSI = 0; ...@@ -587,7 +587,7 @@ CARD16 firstSI = 0, nSI = 0, nTotalSI = 0;
swaps(&pEv->nSI); swaps(&pEv->nSI);
swaps(&pEv->nTotalSI); swaps(&pEv->nTotalSI);
} }
WriteToClient(interest->client, sizeof(xEvent), (char *)pEv); WriteToClient(interest->client, sizeof(xEvent), pEv);
} }
interest= interest->next; interest= interest->next;
} }
...@@ -629,7 +629,7 @@ Time time = 0; ...@@ -629,7 +629,7 @@ Time time = 0;
swaps(&pEv->sequenceNumber); swaps(&pEv->sequenceNumber);
swapl(&pEv->time); swapl(&pEv->time);
} }
WriteToClient(interest->client, sizeof(xEvent), (char *)pEv); WriteToClient(interest->client, sizeof(xEvent), pEv);
} }
interest= interest->next; interest= interest->next;
} }
...@@ -692,7 +692,7 @@ CARD16 reason, supported = 0; ...@@ -692,7 +692,7 @@ CARD16 reason, supported = 0;
swaps(&pEv->reason); swaps(&pEv->reason);
swaps(&pEv->supported); swaps(&pEv->supported);
} }
WriteToClient(interest->client, sizeof(xEvent), (char *)pEv); WriteToClient(interest->client, sizeof(xEvent), pEv);
} }
interest= interest->next; interest= interest->next;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment