aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/Xext/xvmc.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/Xext/xvmc.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/Xext/xvmc.c')
-rw-r--r--nx-X11/programs/Xserver/Xext/xvmc.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/nx-X11/programs/Xserver/Xext/xvmc.c b/nx-X11/programs/Xserver/Xext/xvmc.c
index bce7fbf7a..fa3d1540a 100644
--- a/nx-X11/programs/Xserver/Xext/xvmc.c
+++ b/nx-X11/programs/Xserver/Xext/xvmc.c
@@ -129,7 +129,7 @@ ProcXvMCQueryVersion(ClientPtr client)
rep.length = 0;
rep.major = XvMCVersion;
rep.minor = XvMCRevision;
- WriteToClient(client, sizeof(xvmcQueryVersionReply), (char*)&rep);
+ WriteToClient(client, sizeof(xvmcQueryVersionReply), &rep);
return Success;
}
@@ -169,7 +169,7 @@ ProcXvMCListSurfaceTypes(ClientPtr client)
rep.num = (adaptor) ? adaptor->num_surfaces : 0;
rep.length = rep.num * sizeof(xvmcSurfaceInfo) >> 2;
- WriteToClient(client, sizeof(xvmcListSurfaceTypesReply), (char*)&rep);
+ WriteToClient(client, sizeof(xvmcListSurfaceTypesReply), &rep);
for(i = 0; i < rep.num; i++) {
surface = adaptor->surfaces[i];
@@ -181,7 +181,7 @@ ProcXvMCListSurfaceTypes(ClientPtr client)
info.subpicture_max_height = surface->subpicture_max_height;
info.mc_type = surface->mc_type;
info.flags = surface->flags;
- WriteToClient(client, sizeof(xvmcSurfaceInfo), (char*)&info);
+ WriteToClient(client, sizeof(xvmcSurfaceInfo), &info);
}
return Success;
@@ -270,9 +270,9 @@ ProcXvMCCreateContext(ClientPtr client)
rep.flags_return = pContext->flags;
rep.length = dwords;
- WriteToClient(client, sizeof(xvmcCreateContextReply), (char*)&rep);
+ WriteToClient(client, sizeof(xvmcCreateContextReply), &rep);
if(dwords)
- WriteToClient(client, dwords << 2, (char*)data);
+ WriteToClient(client, dwords << 2, data);
AddResource(pContext->context_id, XvMCRTContext, pContext);
if(data)
@@ -332,9 +332,9 @@ ProcXvMCCreateSurface(ClientPtr client)
rep.sequenceNumber = client->sequence;
rep.length = dwords;
- WriteToClient(client, sizeof(xvmcCreateSurfaceReply), (char*)&rep);
+ WriteToClient(client, sizeof(xvmcCreateSurfaceReply), &rep);
if(dwords)
- WriteToClient(client, dwords << 2, (char*)data);
+ WriteToClient(client, dwords << 2, data);
AddResource(pSurface->surface_id, XvMCRTSurface, pSurface);
if(data)
@@ -443,9 +443,9 @@ ProcXvMCCreateSubpicture(ClientPtr client)
rep.component_order[3] = pSubpicture->component_order[3];
rep.length = dwords;
- WriteToClient(client, sizeof(xvmcCreateSubpictureReply), (char*)&rep);
+ WriteToClient(client, sizeof(xvmcCreateSubpictureReply), &rep);
if(dwords)
- WriteToClient(client, dwords << 2, (char*)data);
+ WriteToClient(client, dwords << 2, data);
AddResource(pSubpicture->subpicture_id, XvMCRTSubpicture, pSubpicture);
if(data)
@@ -525,7 +525,7 @@ ProcXvMCListSubpictureTypes(ClientPtr client)
rep.length = rep.num * sizeof(xvImageFormatInfo) >> 2;
- WriteToClient(client, sizeof(xvmcListSubpictureTypesReply), (char*)&rep);
+ WriteToClient(client, sizeof(xvmcListSubpictureTypesReply), &rep);
for(i = 0; i < rep.num; i++) {
pImage = NULL;
@@ -561,7 +561,7 @@ ProcXvMCListSubpictureTypes(ClientPtr client)
info.vert_v_period = pImage->vert_v_period;
memcpy(&info.comp_order, pImage->component_order, 32);
info.scanline_order = pImage->scanline_order;
- WriteToClient(client, sizeof(xvImageFormatInfo), (char*)&info);
+ WriteToClient(client, sizeof(xvImageFormatInfo), &info);
}
return Success;
@@ -631,7 +631,7 @@ ProcXvMCGetDRInfo(ClientPtr client)
#endif /* HAS_XVMCSHM */
WriteToClient(client, sizeof(xvmcGetDRInfoReply),
- (char*)&rep);
+ &rep);
if (rep.length) {
WriteToClient(client, rep.nameLen,
pScreenPriv->clientDriverName);