diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 2022-09-09 16:51:01 -0400 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 2022-09-09 20:34:19 -0400 |
commit | ea28ca1a2cce8e0d8e5a1f620a809384ed276c37 (patch) | |
tree | 9b0743cd1727eb5e6dbfc84f33dd08db49c5f9a9 /src/AddTrap.c | |
parent | afc7f259668bbb25d5b06929d529add93fb39ebf (diff) |
use casts to reduce compiler warnings (no object change)
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
Diffstat (limited to 'src/AddTrap.c')
-rw-r--r-- | src/AddTrap.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/AddTrap.c b/src/AddTrap.c index ccbada0..5d01114 100644 --- a/src/AddTrap.c +++ b/src/AddTrap.c @@ -47,20 +47,20 @@ XRenderAddTraps (Display *dpy, unsigned long len; GetReq(RenderAddTraps, req); - req->reqType = info->codes->major_opcode; + req->reqType = (CARD8) info->codes->major_opcode; req->renderReqType = X_RenderAddTraps; - req->picture = picture; - req->xOff = xOff; - req->yOff = yOff; + req->picture = (CARD32) picture; + req->xOff = (INT16) xOff; + req->yOff = (INT16) yOff; n = ntrap; len = ((unsigned long) n) * (SIZEOF (xTrap) >> 2); if (len > (max_req - req->length)) { - n = (max_req - req->length) / (SIZEOF (xTrap) >> 2); + n = (int) ((max_req - req->length) / (SIZEOF (xTrap) >> 2)); len = ((unsigned long) n) * (SIZEOF (xTrap) >> 2); } SetReqLen (req, len, len); len <<= 2; - DataInt32 (dpy, (int *) traps, len); + DataInt32 (dpy, (int *) traps, (long) len); ntrap -= n; traps += n; } |