summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2022-11-19 12:05:59 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2022-11-19 12:05:59 -0800
commit64fc7592fd27bbee300085773247dd1737a5af1b (patch)
treec51bf9dda401872ef3027cd36ad625c27256c225
parent80ea445ff6865f9a04c4522c6d8b6cf940b10397 (diff)
Handle 6 of 9 -Wsign-conversion warnings from clang
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--src/Cursor.c2
-rw-r--r--src/Disconnect.c4
-rw-r--r--src/Region.c2
-rw-r--r--src/Xfixes.c4
4 files changed, 6 insertions, 6 deletions
diff --git a/src/Cursor.c b/src/Cursor.c
index 900efb3..2d97cdb 100644
--- a/src/Cursor.c
+++ b/src/Cursor.c
@@ -312,7 +312,7 @@ XFixesCreatePointerBarrier(Display *dpy, Window w, int x1, int y1,
req->y1 = (INT16) y1;
req->x2 = (INT16) x2;
req->y2 = (INT16) y2;
- req->directions = directions;
+ req->directions = (CARD32) directions;
if ((req->num_devices = (CARD16) num_devices)) {
int i;
CARD16 *devs = (CARD16 *)(req + 1);
diff --git a/src/Disconnect.c b/src/Disconnect.c
index 69341d7..172a69f 100644
--- a/src/Disconnect.c
+++ b/src/Disconnect.c
@@ -63,7 +63,7 @@ XFixesSetClientDisconnectMode(Display *dpy, int disconnect_mode)
GetReq(XFixesSetClientDisconnectMode, req);
req->reqType = (CARD8) info->codes->major_opcode;
req->xfixesReqType = X_XFixesSetClientDisconnectMode;
- req->disconnect_mode = disconnect_mode;
+ req->disconnect_mode = (CARD32) disconnect_mode;
UnlockDisplay(dpy);
SyncHandle();
}
@@ -92,7 +92,7 @@ XFixesGetClientDisconnectMode(Display *dpy)
return XFixesClientDisconnectFlagDefault;
}
- disconnect_mode = rep.disconnect_mode;
+ disconnect_mode = (int) rep.disconnect_mode;
UnlockDisplay(dpy);
SyncHandle();
diff --git a/src/Region.c b/src/Region.c
index dcaaea7..20db21a 100644
--- a/src/Region.c
+++ b/src/Region.c
@@ -343,7 +343,7 @@ XFixesFetchRegionAndBounds (Display *dpy,
if (rep.length < (INT_MAX >> 2)) {
nbytes = (long) rep.length << 2;
nrects = rep.length >> 1;
- rects = Xmalloc (nrects * sizeof (XRectangle));
+ rects = Xmalloc ((size_t) nrects * sizeof (XRectangle));
} else {
nbytes = 0;
nrects = 0;
diff --git a/src/Xfixes.c b/src/Xfixes.c
index 74d237d..30ae729 100644
--- a/src/Xfixes.c
+++ b/src/Xfixes.c
@@ -87,8 +87,8 @@ XFixesExtAddDisplay (XFixesExtInfo *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 {