aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/GL/glx/glxcmds.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2016-07-04 00:28:47 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-07-05 13:32:05 +0200
commitf6a1bda2dff0c70aa13f3cb763a9b08c4c037c53 (patch)
tree13abc7de22c00d7ab9080c47df749afbe94d8f85 /nx-X11/programs/Xserver/GL/glx/glxcmds.c
parentff81a52695821704a3eb33e8de8bb7fe55bccfe1 (diff)
downloadnx-libs-f6a1bda2dff0c70aa13f3cb763a9b08c4c037c53.tar.gz
nx-libs-f6a1bda2dff0c70aa13f3cb763a9b08c4c037c53.tar.bz2
nx-libs-f6a1bda2dff0c70aa13f3cb763a9b08c4c037c53.zip
Remove unneccesary casts from WriteToClient calls
Casting return to (void) was used to tell lint that you intended to ignore the return value, so it didn't warn you about it. Casting the third argument to (char *) was used as the most generic pointer type in the days before compilers supported C89 (void *) (except for a couple places it's used for byte-sized pointer math). Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Keith Packard <keithp@keithp.com> Tested-by: Daniel Stone <daniel@fooishbar.org> Backport to nx-libs: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
Diffstat (limited to 'nx-X11/programs/Xserver/GL/glx/glxcmds.c')
-rw-r--r--nx-X11/programs/Xserver/GL/glx/glxcmds.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/nx-X11/programs/Xserver/GL/glx/glxcmds.c b/nx-X11/programs/Xserver/GL/glx/glxcmds.c
index 7d8fbe81f..a92d83062 100644
--- a/nx-X11/programs/Xserver/GL/glx/glxcmds.c
+++ b/nx-X11/programs/Xserver/GL/glx/glxcmds.c
@@ -736,7 +736,7 @@ int DoMakeCurrent( __GLXclientState *cl,
if (client->swapped) {
__glXSwapMakeCurrentReply(client, &reply);
} else {
- WriteToClient(client, sz_xGLXMakeCurrentReply, (char *)&reply);
+ WriteToClient(client, sz_xGLXMakeCurrentReply, &reply);
}
return Success;
}
@@ -765,7 +765,7 @@ int __glXIsDirect(__GLXclientState *cl, GLbyte *pc)
if (client->swapped) {
__glXSwapIsDirectReply(client, &reply);
} else {
- WriteToClient(client, sz_xGLXIsDirectReply, (char *)&reply);
+ WriteToClient(client, sz_xGLXIsDirectReply, &reply);
}
return Success;
@@ -797,7 +797,7 @@ int __glXQueryVersion(__GLXclientState *cl, GLbyte *pc)
if (client->swapped) {
__glXSwapQueryVersionReply(client, &reply);
} else {
- WriteToClient(client, sz_xGLXQueryVersionReply, (char *)&reply);
+ WriteToClient(client, sz_xGLXQueryVersionReply, &reply);
}
return Success;
}
@@ -948,7 +948,7 @@ int DoGetVisualConfigs(__GLXclientState *cl, unsigned screen,
__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 ) {
if (modes->visualID == 0) {
@@ -999,7 +999,7 @@ int DoGetVisualConfigs(__GLXclientState *cl, unsigned screen,
__GLX_SWAP_INT_ARRAY(buf, __GLX_TOTAL_CONFIG);
}
WriteToClient(client, __GLX_SIZE_CARD32 * __GLX_TOTAL_CONFIG,
- (char *)buf);
+ buf);
}
return Success;
}
@@ -1056,7 +1056,7 @@ int DoGetFBConfigs(__GLXclientState *cl, unsigned screen, GLboolean do_swap)
__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 ) {
if (modes->visualID == 0) {
@@ -1108,7 +1108,7 @@ int DoGetFBConfigs(__GLXclientState *cl, unsigned screen, GLboolean do_swap)
__GLX_SWAP_INT_ARRAY(buf, __GLX_FBCONFIG_ATTRIBS_LENGTH);
}
WriteToClient(client, __GLX_SIZE_CARD32 * __GLX_FBCONFIG_ATTRIBS_LENGTH,
- (char *)buf);
+ buf);
}
return Success;
}
@@ -1397,8 +1397,8 @@ int __glXQueryContextInfoEXT(__GLXclientState *cl, GLbyte *pc)
if (client->swapped) {
__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);
}
__glXFree((char *)sendBuf);
@@ -1798,7 +1798,7 @@ static int __glXQueryMaxSwapBarriersSGIX(__GLXclientState *cl, GLbyte *pc)
}
WriteToClient(client, sz_xGLXQueryMaxSwapBarriersSGIXReply,
- (char *) &reply);
+ &reply);
return Success;
}
@@ -1837,9 +1837,9 @@ static int __glxQueryHyperpipeNetworkSGIX(__GLXclientState *cl, GLbyte *pc)
__GLX_SWAP_INT(&reply.npipes);
}
WriteToClient(client, sz_xGLXQueryHyperpipeNetworkSGIXReply,
- (char *) &reply);
+ &reply);
- WriteToClient(client, length << 2, (char *)rdata);
+ WriteToClient(client, length << 2, rdata);
return Success;
}
@@ -1875,7 +1875,7 @@ static int __glxDestroyHyperpipeConfigSGIX (__GLXclientState *cl, GLbyte *pc)
}
WriteToClient(client,
sz_xGLXDestroyHyperpipeConfigSGIXReply,
- (char *) &reply);
+ &reply);
return Success;
}
@@ -1916,9 +1916,9 @@ static int __glxQueryHyperpipeConfigSGIX(__GLXclientState *cl, GLbyte *pc)
}
WriteToClient(client, sz_xGLXQueryHyperpipeConfigSGIXReply,
- (char *) &reply);
+ &reply);
- WriteToClient(client, length << 2, (char *)rdata);
+ WriteToClient(client, length << 2, rdata);
return Success;
}
@@ -1961,7 +1961,7 @@ static int __glxHyperpipeConfigSGIX(__GLXclientState *cl, GLbyte *pc)
}
WriteToClient(client, sz_xGLXHyperpipeConfigSGIXReply,
- (char *) &reply);
+ &reply);
return Success;
}
@@ -2089,8 +2089,8 @@ int __glXQueryExtensionsString(__GLXclientState *cl, GLbyte *pc)
if (client->swapped) {
glxSwapQueryExtensionsStringReply(client, &reply, buf);
} else {
- WriteToClient(client, sz_xGLXQueryExtensionsStringReply,(char *)&reply);
- WriteToClient(client, (int)(length << 2), (char *)buf);
+ WriteToClient(client, sz_xGLXQueryExtensionsStringReply,&reply);
+ WriteToClient(client, (int)(length << 2), buf);
}
__glXFree(buf);
@@ -2146,7 +2146,7 @@ int __glXQueryServerString(__GLXclientState *cl, GLbyte *pc)
if (client->swapped) {
glxSwapQueryServerStringReply(client, &reply, buf);
} else {
- WriteToClient(client, sz_xGLXQueryServerStringReply, (char *)&reply);
+ WriteToClient(client, sz_xGLXQueryServerStringReply, &reply);
WriteToClient(client, (int)(length << 2), buf);
}