summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/AddTrap.c6
-rw-r--r--src/Filter.c2
-rw-r--r--src/Trap.c6
-rw-r--r--src/Xrender.c4
4 files changed, 9 insertions, 9 deletions
diff --git a/src/AddTrap.c b/src/AddTrap.c
index 7e2021e..ccbada0 100644
--- a/src/AddTrap.c
+++ b/src/AddTrap.c
@@ -44,7 +44,7 @@ XRenderAddTraps (Display *dpy,
{
xRenderAddTrapsReq *req;
int n;
- long len;
+ unsigned long len;
GetReq(RenderAddTraps, req);
req->reqType = info->codes->major_opcode;
@@ -53,10 +53,10 @@ XRenderAddTraps (Display *dpy,
req->xOff = xOff;
req->yOff = yOff;
n = ntrap;
- len = ((long) n) * (SIZEOF (xTrap) >> 2);
+ len = ((unsigned long) n) * (SIZEOF (xTrap) >> 2);
if (len > (max_req - req->length)) {
n = (max_req - req->length) / (SIZEOF (xTrap) >> 2);
- len = ((long)n) * (SIZEOF (xTrap) >> 2);
+ len = ((unsigned long) n) * (SIZEOF (xTrap) >> 2);
}
SetReqLen (req, len, len);
len <<= 2;
diff --git a/src/Filter.c b/src/Filter.c
index 8d701eb..c40ae36 100644
--- a/src/Filter.c
+++ b/src/Filter.c
@@ -37,7 +37,7 @@ XRenderQueryFilters (Display *dpy, Drawable drawable)
XFilters *filters;
char *name;
char len;
- int i;
+ unsigned int i;
unsigned long nbytes, nbytesAlias, nbytesName, reply_left;
if (!RenderHasExtension (info))
diff --git a/src/Trap.c b/src/Trap.c
index 636b439..9d8e981 100644
--- a/src/Trap.c
+++ b/src/Trap.c
@@ -46,7 +46,7 @@ XRenderCompositeTrapezoids (Display *dpy,
{
xRenderTrapezoidsReq *req;
int n;
- long len;
+ unsigned long len;
GetReq(RenderTrapezoids, req);
req->reqType = info->codes->major_opcode;
@@ -58,10 +58,10 @@ XRenderCompositeTrapezoids (Display *dpy,
req->xSrc = xSrc;
req->ySrc = ySrc;
n = ntrap;
- len = ((long) n) * (SIZEOF (xTrapezoid) >> 2);
+ len = ((unsigned long) n) * (SIZEOF (xTrapezoid) >> 2);
if (len > (max_req - req->length)) {
n = (max_req - req->length) / (SIZEOF (xTrapezoid) >> 2);
- len = ((long)n) * (SIZEOF (xTrapezoid) >> 2);
+ len = ((unsigned long) n) * (SIZEOF (xTrapezoid) >> 2);
}
SetReqLen (req, len, len);
len <<= 2;
diff --git a/src/Xrender.c b/src/Xrender.c
index a72df5e..299f9d4 100644
--- a/src/Xrender.c
+++ b/src/Xrender.c
@@ -500,7 +500,7 @@ XRenderQueryFormats (Display *dpy)
_XRead (dpy, (char *) xData, rlength);
format = xri->format;
xFormat = (xPictFormInfo *) xData;
- for (int nf = 0; nf < rep.numFormats; nf++)
+ for (unsigned int nf = 0; nf < rep.numFormats; nf++)
{
format->id = xFormat->id;
format->type = xFormat->type;
@@ -567,7 +567,7 @@ XRenderQueryFormats (Display *dpy)
}
xSubpixel = (CARD32 *) xScreen;
screen = xri->screen;
- for (int ns = 0; ns < rep.numSubpixel; ns++)
+ for (unsigned int ns = 0; ns < rep.numSubpixel; ns++)
{
screen->subpixel = *xSubpixel;
xSubpixel++;