[PATCH 3/8] Cast char* buffers to swap functions
Matt Turner
mattst88 at gmail.com
Tue Aug 16 19:58:22 PDT 2011
Signed-off-by: Matt Turner <mattst88 at gmail.com>
---
dix/swaprep.c | 4 ++--
render/render.c | 6 +++---
xkb/xkb.c | 12 ++++++------
3 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/dix/swaprep.c b/dix/swaprep.c
index a02333d..28c354c 100644
--- a/dix/swaprep.c
+++ b/dix/swaprep.c
@@ -397,9 +397,9 @@ SwapFont(xQueryFontReply *pr, Bool hasGlyphs)
* they are always 2 4 byte values */
for(i = 0; i < nprops; i++)
{
- swapl(pby);
+ swapl((int *)pby);
pby += 4;
- swapl(pby);
+ swapl((int *)pby);
pby += 4;
}
if (hasGlyphs)
diff --git a/render/render.c b/render/render.c
index facc32a..cc13dbc 100644
--- a/render/render.c
+++ b/render/render.c
@@ -2375,7 +2375,7 @@ SProcRenderCompositeGlyphs (ClientPtr client)
i = elt->len;
if (i == 0xff)
{
- swapl(buffer);
+ swapl((int *)buffer);
buffer += 4;
}
else
@@ -2388,14 +2388,14 @@ SProcRenderCompositeGlyphs (ClientPtr client)
case 2:
while (i--)
{
- swaps(buffer);
+ swaps((short *)buffer);
buffer += 2;
}
break;
case 4:
while (i--)
{
- swapl(buffer);
+ swapl((int *)buffer);
buffer += 4;
}
break;
diff --git a/xkb/xkb.c b/xkb/xkb.c
index 8e42a7f..0b85953 100644
--- a/xkb/xkb.c
+++ b/xkb/xkb.c
@@ -1109,7 +1109,7 @@ register unsigned i;
register int nSyms= outMap->nSyms;
swaps(&outMap->nSyms);
while (nSyms-->0) {
- swapl(buf);
+ swapl((int *)buf);
buf+= 4;
}
}
@@ -3646,21 +3646,21 @@ char * desc;
if (which&XkbKeycodesNameMask) {
*((CARD32 *)desc)= xkb->names->keycodes;
if (client->swapped) {
- swapl(desc);
+ swapl((int *)desc);
}
desc+= 4;
}
if (which&XkbGeometryNameMask) {
*((CARD32 *)desc)= xkb->names->geometry;
if (client->swapped) {
- swapl(desc);
+ swapl((int *)desc);
}
desc+= 4;
}
if (which&XkbSymbolsNameMask) {
*((CARD32 *)desc)= xkb->names->symbols;
if (client->swapped) {
- swapl(desc);
+ swapl((int *)desc);
}
desc+= 4;
}
@@ -3675,14 +3675,14 @@ char * desc;
if (which&XkbTypesNameMask) {
*((CARD32 *)desc)= (CARD32)xkb->names->types;
if (client->swapped) {
- swapl(desc);
+ swapl((int *)desc);
}
desc+= 4;
}
if (which&XkbCompatNameMask) {
*((CARD32 *)desc)= (CARD32)xkb->names->compat;
if (client->swapped) {
- swapl(desc);
+ swapl((int *)desc);
}
desc+= 4;
}
--
1.7.3.4
More information about the xorg-devel
mailing list