summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2022-11-21 11:50:04 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2022-11-21 11:50:04 -0800
commit544392051e5f566c4eb29fa2e40dbce748935728 (patch)
tree93f21d9050f7363fba12c335cc9203f17f7d1bf7
parent253561cfcc3b95d21046bf08467fa0f68be385da (diff)
Handle implicit conversion warnings from clang
Clears 13 -Wimplicit-int-conversion, 10 -Wshorten-64-to-32, and 2 -Wsign-conversion warnings. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--src/Xcomposite.c52
1 files changed, 27 insertions, 25 deletions
diff --git a/src/Xcomposite.c b/src/Xcomposite.c
index c5127e7..81cda1c 100644
--- a/src/Xcomposite.c
+++ b/src/Xcomposite.c
@@ -124,7 +124,7 @@ XCompositeExtAddDisplay (XCompositeExtInfo *extinfo,
*/
LockDisplay (dpy);
GetReq (CompositeQueryVersion, req);
- req->reqType = info->codes->major_opcode;
+ req->reqType = (CARD8) info->codes->major_opcode;
req->compositeReqType = X_CompositeQueryVersion;
req->majorVersion = COMPOSITE_MAJOR;
req->minorVersion = COMPOSITE_MINOR;
@@ -135,8 +135,8 @@ XCompositeExtAddDisplay (XCompositeExtInfo *extinfo,
Xfree(info);
return NULL;
}
- info->major_version = rep.majorVersion;
- info->minor_version = rep.minorVersion;
+ info->major_version = (int) rep.majorVersion;
+ info->minor_version = (int) rep.minorVersion;
UnlockDisplay (dpy);
SyncHandle ();
} else {
@@ -256,10 +256,10 @@ XCompositeRedirectWindow (Display *dpy, Window window, int update)
XCompositeSimpleCheckExtension (dpy, info);
LockDisplay (dpy);
GetReq (CompositeRedirectWindow, req);
- req->reqType = info->codes->major_opcode;
+ req->reqType = (CARD8) info->codes->major_opcode;
req->compositeReqType = X_CompositeRedirectWindow;
- req->window = window;
- req->update = update;
+ req->window = (CARD32) window;
+ req->update = (CARD8) update;
UnlockDisplay (dpy);
SyncHandle ();
}
@@ -273,10 +273,10 @@ XCompositeRedirectSubwindows (Display *dpy, Window window, int update)
XCompositeSimpleCheckExtension (dpy, info);
LockDisplay (dpy);
GetReq (CompositeRedirectSubwindows, req);
- req->reqType = info->codes->major_opcode;
+ req->reqType = (CARD8) info->codes->major_opcode;
req->compositeReqType = X_CompositeRedirectSubwindows;
- req->window = window;
- req->update = update;
+ req->window = (CARD32) window;
+ req->update = (CARD8) update;
UnlockDisplay (dpy);
SyncHandle ();
}
@@ -290,10 +290,10 @@ XCompositeUnredirectWindow (Display *dpy, Window window, int update)
XCompositeSimpleCheckExtension (dpy, info);
LockDisplay (dpy);
GetReq (CompositeUnredirectWindow, req);
- req->reqType = info->codes->major_opcode;
+ req->reqType = (CARD8) info->codes->major_opcode;
req->compositeReqType = X_CompositeUnredirectWindow;
- req->window = window;
- req->update = update;
+ req->window = (CARD32) window;
+ req->update = (CARD8) update;
UnlockDisplay (dpy);
SyncHandle ();
}
@@ -307,10 +307,10 @@ XCompositeUnredirectSubwindows (Display *dpy, Window window, int update)
XCompositeSimpleCheckExtension (dpy, info);
LockDisplay (dpy);
GetReq (CompositeUnredirectSubwindows, req);
- req->reqType = info->codes->major_opcode;
+ req->reqType = (CARD8) info->codes->major_opcode;
req->compositeReqType = X_CompositeUnredirectSubwindows;
- req->window = window;
- req->update = update;
+ req->window = (CARD32) window;
+ req->update = (CARD8) update;
UnlockDisplay (dpy);
SyncHandle ();
}
@@ -325,10 +325,11 @@ XCompositeCreateRegionFromBorderClip (Display *dpy, Window window)
XCompositeCheckExtension (dpy, info, 0);
LockDisplay (dpy);
GetReq (CompositeCreateRegionFromBorderClip, req);
- req->reqType = info->codes->major_opcode;
+ req->reqType = (CARD8) info->codes->major_opcode;
req->compositeReqType = X_CompositeCreateRegionFromBorderClip;
- req->window = window;
- region = req->region = XAllocID (dpy);
+ req->window = (CARD32) window;
+ region = XAllocID (dpy);
+ req->region = (CARD32) region;
UnlockDisplay (dpy);
SyncHandle ();
return region;
@@ -344,10 +345,11 @@ XCompositeNameWindowPixmap (Display *dpy, Window window)
XCompositeCheckExtension (dpy, info, 0);
LockDisplay (dpy);
GetReq (CompositeNameWindowPixmap, req);
- req->reqType = info->codes->major_opcode;
+ req->reqType = (CARD8) info->codes->major_opcode;
req->compositeReqType = X_CompositeNameWindowPixmap;
- req->window = window;
- pixmap = req->pixmap = XAllocID (dpy);
+ req->window = (CARD32) window;
+ pixmap = XAllocID (dpy);
+ req->pixmap = (CARD32) pixmap;
UnlockDisplay (dpy);
SyncHandle ();
return pixmap;
@@ -363,9 +365,9 @@ XCompositeGetOverlayWindow (Display *dpy, Window window)
XCompositeCheckExtension (dpy, info, 0);
LockDisplay (dpy);
GetReq (CompositeGetOverlayWindow, req);
- req->reqType = info->codes->major_opcode;
+ req->reqType = (CARD8) info->codes->major_opcode;
req->compositeReqType = X_CompositeGetOverlayWindow;
- req->window = window;
+ req->window = (CARD32) window;
if (!_XReply (dpy, (xReply *) &rep, 0, xFalse))
{
UnlockDisplay (dpy);
@@ -388,9 +390,9 @@ XCompositeReleaseOverlayWindow (Display *dpy, Window window)
XCompositeSimpleCheckExtension (dpy, info);
LockDisplay (dpy);
GetReq (CompositeReleaseOverlayWindow, req);
- req->reqType = info->codes->major_opcode;
+ req->reqType = (CARD8) info->codes->major_opcode;
req->compositeReqType = X_CompositeReleaseOverlayWindow;
- req->window = window;
+ req->window = (CARD32) window;
UnlockDisplay (dpy);
SyncHandle ();
}