diff options
Diffstat (limited to 'hw/dmx/glxProxy')
-rw-r--r-- | hw/dmx/glxProxy/glxcmds.c | 39 | ||||
-rw-r--r-- | hw/dmx/glxProxy/glxcmdsswap.c | 29 | ||||
-rw-r--r-- | hw/dmx/glxProxy/glxsingle.c | 16 | ||||
-rw-r--r-- | hw/dmx/glxProxy/glxvendor.c | 12 | ||||
-rw-r--r-- | hw/dmx/glxProxy/unpack.h | 12 |
5 files changed, 51 insertions, 57 deletions
diff --git a/hw/dmx/glxProxy/glxcmds.c b/hw/dmx/glxProxy/glxcmds.c index 49c6ef1ed..32684faab 100644 --- a/hw/dmx/glxProxy/glxcmds.c +++ b/hw/dmx/glxProxy/glxcmds.c @@ -465,8 +465,7 @@ __glXQueryMaxSwapBarriersSGIX(__GLXclientState * cl, GLbyte * pc) __glXSwapQueryMaxSwapBarriersSGIXReply(client, &reply); } else { - WriteToClient(client, sz_xGLXQueryMaxSwapBarriersSGIXReply, - (char *) &reply); + WriteToClient(client, sz_xGLXQueryMaxSwapBarriersSGIXReply, &reply); } return Success; @@ -1388,8 +1387,7 @@ MakeCurrent(__GLXclientState * cl, __glXSwapMakeCurrentReply(client, &new_reply); } else { - WriteToClient(client, sz_xGLXMakeContextCurrentReply, - (char *) &new_reply); + WriteToClient(client, sz_xGLXMakeContextCurrentReply, &new_reply); } return Success; @@ -1449,7 +1447,7 @@ __glXIsDirect(__GLXclientState * cl, GLbyte * pc) __glXSwapIsDirectReply(client, &reply); } else { - WriteToClient(client, sz_xGLXIsDirectReply, (char *) &reply); + WriteToClient(client, sz_xGLXIsDirectReply, &reply); } return Success; @@ -1478,7 +1476,7 @@ __glXQueryVersion(__GLXclientState * cl, GLbyte * pc) __glXSwapQueryVersionReply(client, &reply); } else { - WriteToClient(client, sz_xGLXQueryVersionReply, (char *) &reply); + WriteToClient(client, sz_xGLXQueryVersionReply, &reply); } return Success; } @@ -1689,7 +1687,7 @@ __glXGetVisualConfigs(__GLXclientState * cl, GLbyte * pc) reply.type = X_Reply; reply.sequenceNumber = client->sequence; - WriteToClient(client, sz_xGLXGetVisualConfigsReply, (char *) &reply); + WriteToClient(client, sz_xGLXGetVisualConfigsReply, &reply); for (i = 0; i < pGlxScreen->numVisuals; i++) { pGlxVisual = &pGlxScreen->pGlxVisual[i]; @@ -1743,8 +1741,7 @@ __glXGetVisualConfigs(__GLXclientState * cl, GLbyte * pc) buf[p++] = GLX_VISUAL_SELECT_GROUP_SGIX; buf[p++] = pGlxVisual->visualSelectGroup; - WriteToClient(client, __GLX_SIZE_CARD32 * __GLX_TOTAL_CONFIG, - (char *) buf); + WriteToClient(client, __GLX_SIZE_CARD32 * __GLX_TOTAL_CONFIG, buf); } return Success; } @@ -2637,9 +2634,8 @@ __glXQueryExtensionsString(__GLXclientState * cl, GLbyte * pc) glxSwapQueryExtensionsStringReply(client, &reply, be_buf); } else { - WriteToClient(client, sz_xGLXQueryExtensionsStringReply, - (char *) &reply); - WriteToClient(client, (int) (length << 2), (char *) be_buf); + WriteToClient(client, sz_xGLXQueryExtensionsStringReply, &reply); + WriteToClient(client, (int) (length << 2), be_buf); } return Success; @@ -2719,7 +2715,7 @@ __glXQueryServerString(__GLXclientState * cl, GLbyte * pc) glxSwapQueryServerStringReply(client, &reply, be_buf); } else { - WriteToClient(client, sz_xGLXQueryServerStringReply, (char *) &reply); + WriteToClient(client, sz_xGLXQueryServerStringReply, &reply); WriteToClient(client, (int) (length << 2), be_buf); } @@ -2880,7 +2876,7 @@ __glXGetFBConfigs(__GLXclientState * cl, GLbyte * pc) __GLX_SWAP_INT(&reply.numFBConfigs); __GLX_SWAP_INT(&reply.numAttribs); } - WriteToClient(client, sz_xGLXGetFBConfigsReply, (char *) &reply); + WriteToClient(client, sz_xGLXGetFBConfigsReply, &reply); for (i = 0; i < numFBConfigs; i++) { int associatedVisualId = 0; @@ -3021,7 +3017,7 @@ __glXGetFBConfigs(__GLXclientState * cl, GLbyte * pc) __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT_ARRAY((int *) buf, 2 * numAttribs); } - WriteToClient(client, 2 * numAttribs * __GLX_SIZE_CARD32, (char *) buf); + WriteToClient(client, 2 * numAttribs * __GLX_SIZE_CARD32, buf); } return Success; } @@ -3218,8 +3214,8 @@ __glXQueryContext(__GLXclientState * cl, GLbyte * pc) __glXSwapQueryContextReply(client, &reply, sendBuf); } else { - WriteToClient(client, sz_xGLXQueryContextReply, (char *) &reply); - WriteToClient(client, nReplyBytes, (char *) sendBuf); + WriteToClient(client, sz_xGLXQueryContextReply, &reply); + WriteToClient(client, nReplyBytes, sendBuf); } free((char *) sendBuf); @@ -3270,8 +3266,8 @@ __glXQueryContextInfoEXT(__GLXclientState * cl, GLbyte * pc) __glXSwapQueryContextInfoEXTReply(client, &reply, sendBuf); } else { - WriteToClient(client, sz_xGLXQueryContextInfoEXTReply, (char *) &reply); - WriteToClient(client, nReplyBytes, (char *) sendBuf); + WriteToClient(client, sz_xGLXQueryContextInfoEXTReply, &reply); + WriteToClient(client, nReplyBytes, sendBuf); } free((char *) sendBuf); @@ -3606,9 +3602,8 @@ __glXGetDrawableAttributes(__GLXclientState * cl, GLbyte * pc) __glXSwapGetDrawableAttributesReply(client, &reply, (int *) attribs); } else { - WriteToClient(client, sz_xGLXGetDrawableAttributesReply, - (char *) &reply); - WriteToClient(client, attribs_size, (char *) attribs); + WriteToClient(client, sz_xGLXGetDrawableAttributesReply, &reply); + WriteToClient(client, attribs_size, attribs); } free(attribs); diff --git a/hw/dmx/glxProxy/glxcmdsswap.c b/hw/dmx/glxProxy/glxcmdsswap.c index ec0e83d09..a11c9196f 100644 --- a/hw/dmx/glxProxy/glxcmdsswap.c +++ b/hw/dmx/glxProxy/glxcmdsswap.c @@ -304,7 +304,7 @@ __glXSwapGetVisualConfigs(__GLXclientState * cl, GLbyte * pc) __GLX_SWAP_INT(&reply.length); __GLX_SWAP_INT(&reply.numVisuals); __GLX_SWAP_INT(&reply.numProps); - WriteToClient(client, sz_xGLXGetVisualConfigsReply, (char *) &reply); + WriteToClient(client, sz_xGLXGetVisualConfigsReply, &reply); for (i = 0; i < pGlxScreen->numVisuals; i++) { pGlxVisual = &pGlxScreen->pGlxVisual[i]; @@ -353,8 +353,7 @@ __glXSwapGetVisualConfigs(__GLXclientState * cl, GLbyte * pc) buf[p++] = pGlxVisual->transparentIndex; __GLX_SWAP_INT_ARRAY(buf, __GLX_TOTAL_CONFIG); - WriteToClient(client, __GLX_SIZE_CARD32 * __GLX_TOTAL_CONFIG, - (char *) buf); + WriteToClient(client, __GLX_SIZE_CARD32 * __GLX_TOTAL_CONFIG, buf); } return Success; } @@ -508,7 +507,7 @@ __glXSwapMakeCurrentReply(ClientPtr client, xGLXMakeCurrentReadSGIReply * reply) __GLX_SWAP_INT(&reply->writeType); __GLX_SWAP_INT(&reply->readVid); __GLX_SWAP_INT(&reply->readType); - WriteToClient(client, sz_xGLXMakeCurrentReadSGIReply, (char *) reply); + WriteToClient(client, sz_xGLXMakeCurrentReadSGIReply, reply); } void @@ -517,7 +516,7 @@ __glXSwapIsDirectReply(ClientPtr client, xGLXIsDirectReply * reply) __GLX_DECLARE_SWAP_VARIABLES; __GLX_SWAP_SHORT(&reply->sequenceNumber); __GLX_SWAP_INT(&reply->length); - WriteToClient(client, sz_xGLXIsDirectReply, (char *) reply); + WriteToClient(client, sz_xGLXIsDirectReply, reply); } void @@ -528,7 +527,7 @@ __glXSwapQueryVersionReply(ClientPtr client, xGLXQueryVersionReply * reply) __GLX_SWAP_INT(&reply->length); __GLX_SWAP_INT(&reply->majorVersion); __GLX_SWAP_INT(&reply->minorVersion); - WriteToClient(client, sz_xGLXQueryVersionReply, (char *) reply); + WriteToClient(client, sz_xGLXQueryVersionReply, reply); } void @@ -543,7 +542,7 @@ glxSwapQueryExtensionsStringReply(ClientPtr client, __GLX_SWAP_SHORT(&reply->sequenceNumber); __GLX_SWAP_INT(&reply->length); __GLX_SWAP_INT(&reply->n); - WriteToClient(client, sz_xGLXQueryExtensionsStringReply, (char *) reply); + WriteToClient(client, sz_xGLXQueryExtensionsStringReply, reply); __GLX_SWAP_INT_ARRAY((int *) buf, length); WriteToClient(client, length << 2, buf); } @@ -558,7 +557,7 @@ glxSwapQueryServerStringReply(ClientPtr client, __GLX_SWAP_SHORT(&reply->sequenceNumber); __GLX_SWAP_INT(&reply->length); __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 **/ /* __GLX_SWAP_INT_ARRAY((int *)buf, length); */ WriteToClient(client, length << 2, buf); @@ -576,9 +575,9 @@ __glXSwapQueryContextInfoEXTReply(ClientPtr client, __GLX_SWAP_SHORT(&reply->sequenceNumber); __GLX_SWAP_INT(&reply->length); __GLX_SWAP_INT(&reply->n); - WriteToClient(client, sz_xGLXQueryContextInfoEXTReply, (char *) reply); + WriteToClient(client, sz_xGLXQueryContextInfoEXTReply, reply); __GLX_SWAP_INT_ARRAY((int *) buf, length); - WriteToClient(client, length << 2, (char *) buf); + WriteToClient(client, length << 2, buf); } void @@ -592,9 +591,9 @@ __glXSwapQueryContextReply(ClientPtr client, __GLX_SWAP_SHORT(&reply->sequenceNumber); __GLX_SWAP_INT(&reply->length); __GLX_SWAP_INT(&reply->n); - WriteToClient(client, sz_xGLXQueryContextReply, (char *) reply); + WriteToClient(client, sz_xGLXQueryContextReply, reply); __GLX_SWAP_INT_ARRAY((int *) buf, length); - WriteToClient(client, length << 2, (char *) buf); + WriteToClient(client, length << 2, buf); } void @@ -608,8 +607,8 @@ __glXSwapGetDrawableAttributesReply(ClientPtr client, __GLX_SWAP_INT(&reply->length); __GLX_SWAP_INT(&reply->numAttribs); __GLX_SWAP_INT_ARRAY(buf, reply->length); - WriteToClient(client, sz_xGLXGetDrawableAttributesReply, (char *) reply); - WriteToClient(client, reply->length << 2, (char *) buf); + WriteToClient(client, sz_xGLXGetDrawableAttributesReply, reply); + WriteToClient(client, reply->length << 2, buf); } void @@ -621,7 +620,7 @@ __glXSwapQueryMaxSwapBarriersSGIXReply(ClientPtr client, __GLX_SWAP_SHORT(&reply->sequenceNumber); __GLX_SWAP_INT(&reply->length); __GLX_SWAP_INT(&reply->max); - WriteToClient(client, sz_xGLXQueryMaxSwapBarriersSGIXReply, (char *) reply); + WriteToClient(client, sz_xGLXQueryMaxSwapBarriersSGIXReply, reply); } /************************************************************************/ diff --git a/hw/dmx/glxProxy/glxsingle.c b/hw/dmx/glxProxy/glxsingle.c index 63786cf79..2253060b8 100644 --- a/hw/dmx/glxProxy/glxsingle.c +++ b/hw/dmx/glxProxy/glxsingle.c @@ -147,9 +147,9 @@ SendSwappedReply(ClientPtr client, } - WriteToClient(client, sizeof(xGLXSingleReply), (char *) reply); + WriteToClient(client, sizeof(xGLXSingleReply), reply); if (buf_size > 0) - WriteToClient(client, buf_size, (char *) buf); + WriteToClient(client, buf_size, buf); } @@ -281,9 +281,9 @@ __glXForwardPipe0WithReply(__GLXclientState * cl, GLbyte * pc) SendSwappedReply(client, &reply, be_buf, be_buf_size); } else { - WriteToClient(client, sizeof(xGLXSingleReply), (char *) &reply); + WriteToClient(client, sizeof(xGLXSingleReply), &reply); if (be_buf_size > 0) - WriteToClient(client, be_buf_size, (char *) be_buf); + WriteToClient(client, be_buf_size, be_buf); } if (be_buf_size > 0) @@ -383,9 +383,9 @@ __glXForwardAllWithReply(__GLXclientState * cl, GLbyte * pc) SendSwappedReply(client, &reply, be_buf, be_buf_size); } else { - WriteToClient(client, sizeof(xGLXSingleReply), (char *) &reply); + WriteToClient(client, sizeof(xGLXSingleReply), &reply); if (be_buf_size > 0) - WriteToClient(client, be_buf_size, (char *) be_buf); + WriteToClient(client, be_buf_size, be_buf); } if (be_buf_size > 0) @@ -1013,9 +1013,9 @@ __glXDisp_ReadPixels(__GLXclientState * cl, GLbyte * pc) __GLX_SWAP_INT(&reply.length); } - WriteToClient(client, sizeof(xGLXReadPixelsReply), (char *) &reply); + WriteToClient(client, sizeof(xGLXReadPixelsReply), &reply); if (buf_size > 0) { - WriteToClient(client, buf_size, (char *) buf); + WriteToClient(client, buf_size, buf); free(buf); } diff --git a/hw/dmx/glxProxy/glxvendor.c b/hw/dmx/glxProxy/glxvendor.c index 963c92e87..e5c8da144 100644 --- a/hw/dmx/glxProxy/glxvendor.c +++ b/hw/dmx/glxProxy/glxvendor.c @@ -138,9 +138,9 @@ SendSwappedReply(ClientPtr client, } - WriteToClient(client, sizeof(xGLXVendorPrivReply), (char *) reply); + WriteToClient(client, sizeof(xGLXVendorPrivReply), reply); if (buf_size > 0) - WriteToClient(client, buf_size, (char *) buf); + WriteToClient(client, buf_size, buf); } @@ -265,9 +265,9 @@ __glXVForwardPipe0WithReply(__GLXclientState * cl, GLbyte * pc) SendSwappedReply(client, &reply, be_buf, be_buf_size); } else { - WriteToClient(client, sizeof(xGLXVendorPrivReply), (char *) &reply); + WriteToClient(client, sizeof(xGLXVendorPrivReply), &reply); if (be_buf_size > 0) - WriteToClient(client, be_buf_size, (char *) be_buf); + WriteToClient(client, be_buf_size, be_buf); } if (be_buf_size > 0) @@ -364,9 +364,9 @@ __glXVForwardAllWithReply(__GLXclientState * cl, GLbyte * pc) SendSwappedReply(client, &reply, be_buf, be_buf_size); } else { - WriteToClient(client, sizeof(xGLXVendorPrivReply), (char *) &reply); + WriteToClient(client, sizeof(xGLXVendorPrivReply), &reply); if (be_buf_size > 0) - WriteToClient(client, be_buf_size, (char *) be_buf); + WriteToClient(client, be_buf_size, be_buf); } if (be_buf_size > 0) diff --git a/hw/dmx/glxProxy/unpack.h b/hw/dmx/glxProxy/unpack.h index b4b73580c..45c27c6b9 100644 --- a/hw/dmx/glxProxy/unpack.h +++ b/hw/dmx/glxProxy/unpack.h @@ -59,7 +59,7 @@ extern xGLXSingleReply __glXReply; __glXReply.sequenceNumber = client->sequence; #define __GLX_SEND_HEADER() \ - WriteToClient( client, sz_xGLXSingleReply, (char *)&__glXReply); + WriteToClient (client, sz_xGLXSingleReply, &__glXReply); #define __GLX_PUT_RETVAL(a) \ __glXReply.retval = (a); @@ -112,19 +112,19 @@ extern xGLXSingleReply __glXReply; *(GLdouble *)&__glXReply.pad3 = *(GLdouble *)answer #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) \ - 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) \ - WriteToClient(client, (len)*__GLX_SIZE_INT32, (char *)answer) + WriteToClient(client, (len)*__GLX_SIZE_INT32, answer) #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) \ - 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_UBYTE_ARRAY(len) __GLX_SEND_BYTE_ARRAY(len) |