summaryrefslogtreecommitdiff
path: root/lib/libX11/src/xkb/XKBGAlloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libX11/src/xkb/XKBGAlloc.c')
-rw-r--r--lib/libX11/src/xkb/XKBGAlloc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libX11/src/xkb/XKBGAlloc.c b/lib/libX11/src/xkb/XKBGAlloc.c
index 6b464d41c..3a257c04b 100644
--- a/lib/libX11/src/xkb/XKBGAlloc.c
+++ b/lib/libX11/src/xkb/XKBGAlloc.c
@@ -69,8 +69,8 @@ _XkbFreeGeomLeafElems(Bool freeAll,
ptr = *elems;
extra = ((*num_inout) - (first + count)) * elem_sz;
if (extra > 0)
- memmove(&ptr[first * elem_sz], &ptr[(first + count) * elem_sz],
- extra);
+ memmove(&ptr[(unsigned) first * elem_sz], &ptr[(unsigned)(first + count) * elem_sz],
+ (size_t) extra);
(*num_inout) -= count;
}
return;
@@ -124,7 +124,7 @@ _XkbFreeGeomNonLeafElems(Bool freeAll,
else {
i = ((*num_inout) - (first + count)) * elem_sz;
ptr = *elems;
- memmove(&ptr[first * elem_sz], &ptr[(first + count) * elem_sz], i);
+ memmove(&ptr[(unsigned) first * elem_sz], &ptr[(unsigned)(first + count) * elem_sz], (size_t) i);
(*num_inout) -= count;
}
return;