From ea28ca1a2cce8e0d8e5a1f620a809384ed276c37 Mon Sep 17 00:00:00 2001 From: "Thomas E. Dickey" Date: Fri, 9 Sep 2022 16:51:01 -0400 Subject: use casts to reduce compiler warnings (no object change) Signed-off-by: Thomas E. Dickey --- src/AddTrap.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/AddTrap.c') 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; } -- cgit v1.2.3