diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2022-08-28 11:52:49 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2022-09-07 17:59:53 +0000 |
commit | 2b927f88ad3d97e5fd1abd13b67724a86dd10404 (patch) | |
tree | 5664010c4062ba7bd0cfde81904f46724e62cdc1 | |
parent | 229c65d2dd6de511a005127245dc28d426ad6860 (diff) |
Resolve -Wsign-compare warnings
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | src/AddTrap.c | 6 | ||||
-rw-r--r-- | src/Filter.c | 2 | ||||
-rw-r--r-- | src/Trap.c | 6 | ||||
-rw-r--r-- | src/Xrender.c | 4 |
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)) @@ -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++; |