diff options
author | Matt Turner <mattst88@gmail.com> | 2011-08-16 16:59:07 -0400 |
---|---|---|
committer | Matt Turner <mattst88@gmail.com> | 2011-09-21 17:14:44 -0400 |
commit | 54770c980cd2b91a8377f975a58ed69def5cfa42 (patch) | |
tree | 606ae54d61019884d0ad2d3c46e5be9785682f76 | |
parent | 9edcae78c46286baff42e74bfe26f6ae4d00fe01 (diff) |
Cast char* buffers to swap functions
Reviewed-by: Peter Harris <pharris@opentext.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
-rw-r--r-- | dix/swaprep.c | 4 | ||||
-rw-r--r-- | render/render.c | 6 | ||||
-rw-r--r-- | xkb/xkb.c | 12 |
3 files changed, 11 insertions, 11 deletions
diff --git a/dix/swaprep.c b/dix/swaprep.c index a02333d10..28c354cd9 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 facc32a29..cc13dbc2a 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; @@ -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; } |