aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/Xext/xvdisp.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/xvdisp.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/xvdisp.c')
-rw-r--r--nx-X11/programs/Xserver/Xext/xvdisp.c58
1 files changed, 29 insertions, 29 deletions
diff --git a/nx-X11/programs/Xserver/Xext/xvdisp.c b/nx-X11/programs/Xserver/Xext/xvdisp.c
index 923202701..66dcc791a 100644
--- a/nx-X11/programs/Xserver/Xext/xvdisp.c
+++ b/nx-X11/programs/Xserver/Xext/xvdisp.c
@@ -160,59 +160,59 @@ static int SWriteImageFormatInfo(ClientPtr, xvImageFormatInfo*);
#define _WriteQueryAdaptorsReply(_c,_d) \
if ((_c)->swapped) SWriteQueryAdaptorsReply(_c, _d); \
- else WriteToClient(_c, sz_xvQueryAdaptorsReply, (char*)_d)
+ else WriteToClient(_c, sz_xvQueryAdaptorsReply, _d)
#define _WriteQueryExtensionReply(_c,_d) \
if ((_c)->swapped) SWriteQueryExtensionReply(_c, _d); \
- else WriteToClient(_c, sz_xvQueryExtensionReply, (char*)_d)
+ else WriteToClient(_c, sz_xvQueryExtensionReply, _d)
#define _WriteQueryEncodingsReply(_c,_d) \
if ((_c)->swapped) SWriteQueryEncodingsReply(_c, _d); \
- else WriteToClient(_c, sz_xvQueryEncodingsReply, (char*)_d)
+ else WriteToClient(_c, sz_xvQueryEncodingsReply, _d)
#define _WriteAdaptorInfo(_c,_d) \
if ((_c)->swapped) SWriteAdaptorInfo(_c, _d); \
- else WriteToClient(_c, sz_xvAdaptorInfo, (char*)_d)
+ else WriteToClient(_c, sz_xvAdaptorInfo, _d)
#define _WriteAttributeInfo(_c,_d) \
if ((_c)->swapped) SWriteAttributeInfo(_c, _d); \
- else WriteToClient(_c, sz_xvAttributeInfo, (char*)_d)
+ else WriteToClient(_c, sz_xvAttributeInfo, _d)
#define _WriteEncodingInfo(_c,_d) \
if ((_c)->swapped) SWriteEncodingInfo(_c, _d); \
- else WriteToClient(_c, sz_xvEncodingInfo, (char*)_d)
+ else WriteToClient(_c, sz_xvEncodingInfo, _d)
#define _WriteFormat(_c,_d) \
if ((_c)->swapped) SWriteFormat(_c, _d); \
- else WriteToClient(_c, sz_xvFormat, (char*)_d)
+ else WriteToClient(_c, sz_xvFormat, _d)
#define _WriteGrabPortReply(_c,_d) \
if ((_c)->swapped) SWriteGrabPortReply(_c, _d); \
- else WriteToClient(_c, sz_xvGrabPortReply, (char*)_d)
+ else WriteToClient(_c, sz_xvGrabPortReply, _d)
#define _WriteGetPortAttributeReply(_c,_d) \
if ((_c)->swapped) SWriteGetPortAttributeReply(_c, _d); \
- else WriteToClient(_c, sz_xvGetPortAttributeReply, (char*)_d)
+ else WriteToClient(_c, sz_xvGetPortAttributeReply, _d)
#define _WriteQueryBestSizeReply(_c,_d) \
if ((_c)->swapped) SWriteQueryBestSizeReply(_c, _d); \
- else WriteToClient(_c, sz_xvQueryBestSizeReply,(char*) _d)
+ else WriteToClient(_c, sz_xvQueryBestSizeReply, _d)
#define _WriteQueryPortAttributesReply(_c,_d) \
if ((_c)->swapped) SWriteQueryPortAttributesReply(_c, _d); \
- else WriteToClient(_c, sz_xvQueryPortAttributesReply,(char*) _d)
+ else WriteToClient(_c, sz_xvQueryPortAttributesReply, _d)
#define _WriteQueryImageAttributesReply(_c,_d) \
if ((_c)->swapped) SWriteQueryImageAttributesReply(_c, _d); \
- else WriteToClient(_c, sz_xvQueryImageAttributesReply,(char*) _d)
+ else WriteToClient(_c, sz_xvQueryImageAttributesReply, _d)
#define _WriteListImageFormatsReply(_c,_d) \
if ((_c)->swapped) SWriteListImageFormatsReply(_c, _d); \
- else WriteToClient(_c, sz_xvListImageFormatsReply,(char*) _d)
+ else WriteToClient(_c, sz_xvListImageFormatsReply, _d)
#define _WriteImageFormatInfo(_c,_d) \
if ((_c)->swapped) SWriteImageFormatInfo(_c, _d); \
- else WriteToClient(_c, sz_xvImageFormatInfo, (char*)_d)
+ else WriteToClient(_c, sz_xvImageFormatInfo, _d)
#define _AllocatePort(_i,_p) \
((_p)->id != _i) ? (* (_p)->pAdaptor->ddAllocatePort)(_i,_p,&_p) : Success
@@ -1278,7 +1278,7 @@ ProcXvQueryImageAttributes(ClientPtr client)
_WriteQueryImageAttributesReply(client, &rep);
if(client->swapped)
SwapLongs((CARD32*)offsets, rep.length);
- WriteToClient(client, rep.length << 2, (char*)offsets);
+ WriteToClient(client, rep.length << 2, offsets);
free(offsets);
@@ -1639,7 +1639,7 @@ SWriteQueryExtensionReply(
swaps(&rep->version);
swaps(&rep->revision);
- (void)WriteToClient(client, sz_xvQueryExtensionReply, (char *)&rep);
+ WriteToClient(client, sz_xvQueryExtensionReply, &rep);
return Success;
}
@@ -1653,7 +1653,7 @@ SWriteQueryAdaptorsReply(
swapl(&rep->length);
swaps(&rep->num_adaptors);
- (void)WriteToClient(client, sz_xvQueryAdaptorsReply, (char *)&rep);
+ WriteToClient(client, sz_xvQueryAdaptorsReply, &rep);
return Success;
}
@@ -1667,7 +1667,7 @@ SWriteQueryEncodingsReply(
swapl(&rep->length);
swaps(&rep->num_encodings);
- (void)WriteToClient(client, sz_xvQueryEncodingsReply, (char *)&rep);
+ WriteToClient(client, sz_xvQueryEncodingsReply, &rep);
return Success;
}
@@ -1682,7 +1682,7 @@ SWriteAdaptorInfo(
swaps(&pAdaptor->num_ports);
swaps(&pAdaptor->num_formats);
- (void)WriteToClient(client, sz_xvAdaptorInfo, (char *)pAdaptor);
+ WriteToClient(client, sz_xvAdaptorInfo, pAdaptor);
return Success;
}
@@ -1698,7 +1698,7 @@ SWriteEncodingInfo(
swaps(&pEncoding->height);
swapl(&pEncoding->rate.numerator);
swapl(&pEncoding->rate.denominator);
- (void)WriteToClient(client, sz_xvEncodingInfo, (char *)pEncoding);
+ WriteToClient(client, sz_xvEncodingInfo, pEncoding);
return Success;
}
@@ -1709,7 +1709,7 @@ SWriteFormat(
xvFormat *pFormat
){
swapl(&pFormat->visual);
- (void)WriteToClient(client, sz_xvFormat, (char *)pFormat);
+ WriteToClient(client, sz_xvFormat, pFormat);
return Success;
}
@@ -1723,7 +1723,7 @@ SWriteAttributeInfo(
swapl(&pAtt->size);
swapl(&pAtt->min);
swapl(&pAtt->max);
- (void)WriteToClient(client, sz_xvAttributeInfo, (char *)pAtt);
+ WriteToClient(client, sz_xvAttributeInfo, pAtt);
return Success;
}
@@ -1747,7 +1747,7 @@ SWriteImageFormatInfo(
swapl(&pImage->vert_u_period);
swapl(&pImage->vert_v_period);
- (void)WriteToClient(client, sz_xvImageFormatInfo, (char *)pImage);
+ WriteToClient(client, sz_xvImageFormatInfo, pImage);
return Success;
}
@@ -1762,7 +1762,7 @@ SWriteGrabPortReply(
swaps(&rep->sequenceNumber);
swapl(&rep->length);
- (void)WriteToClient(client, sz_xvGrabPortReply, (char *)&rep);
+ WriteToClient(client, sz_xvGrabPortReply, &rep);
return Success;
}
@@ -1776,7 +1776,7 @@ SWriteGetPortAttributeReply(
swapl(&rep->length);
swapl(&rep->value);
- (void)WriteToClient(client, sz_xvGetPortAttributeReply, (char *)&rep);
+ WriteToClient(client, sz_xvGetPortAttributeReply, &rep);
return Success;
}
@@ -1791,7 +1791,7 @@ SWriteQueryBestSizeReply(
swaps(&rep->actual_width);
swaps(&rep->actual_height);
- (void)WriteToClient(client, sz_xvQueryBestSizeReply, (char *)&rep);
+ WriteToClient(client, sz_xvQueryBestSizeReply, &rep);
return Success;
}
@@ -1806,7 +1806,7 @@ SWriteQueryPortAttributesReply(
swapl(&rep->num_attributes);
swapl(&rep->text_size);
- (void)WriteToClient(client, sz_xvQueryPortAttributesReply, (char *)&rep);
+ WriteToClient(client, sz_xvQueryPortAttributesReply, &rep);
return Success;
}
@@ -1823,7 +1823,7 @@ SWriteQueryImageAttributesReply(
swaps(&rep->width);
swaps(&rep->height);
- (void)WriteToClient(client, sz_xvQueryImageAttributesReply, (char *)&rep);
+ WriteToClient(client, sz_xvQueryImageAttributesReply, &rep);
return Success;
}
@@ -1838,7 +1838,7 @@ SWriteListImageFormatsReply(
swapl(&rep->length);
swapl(&rep->num_formats);
- (void)WriteToClient(client, sz_xvListImageFormatsReply, (char *)&rep);
+ WriteToClient(client, sz_xvListImageFormatsReply, &rep);
return Success;
}