diff options
Diffstat (limited to 'nx-X11/lib/src/xkb/XKBSetGeom.c')
-rw-r--r-- | nx-X11/lib/src/xkb/XKBSetGeom.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/nx-X11/lib/src/xkb/XKBSetGeom.c b/nx-X11/lib/src/xkb/XKBSetGeom.c index ee254e0dc..5d94072ce 100644 --- a/nx-X11/lib/src/xkb/XKBSetGeom.c +++ b/nx-X11/lib/src/xkb/XKBSetGeom.c @@ -52,7 +52,7 @@ _WriteCountedString(char *wire, char *str) { CARD16 len, *pLen; - len = (str ? strlen(str) : 0); + len = (CARD16) (str ? strlen(str) : 0); pLen = (CARD16 *) wire; *pLen = len; if (len && str) @@ -69,8 +69,8 @@ _SizeGeomProperties(XkbGeometryPtr geom) for (size = i = 0, prop = geom->properties; i < geom->num_properties; i++, prop++) { - size += _SizeCountedString(prop->name); - size += _SizeCountedString(prop->value); + size = (int) ((unsigned) size + _SizeCountedString(prop->name)); + size = (int) ((unsigned) size + _SizeCountedString(prop->value)); } return size; } @@ -82,7 +82,7 @@ _SizeGeomColors(XkbGeometryPtr geom) register XkbColorPtr color; for (i = size = 0, color = geom->colors; i < geom->num_colors; i++, color++) { - size += _SizeCountedString(color->spec); + size = (int) ((unsigned) size + _SizeCountedString(color->spec)); } return size; } @@ -114,11 +114,11 @@ _SizeGeomDoodads(int num_doodads, XkbDoodadPtr doodad) for (i = size = 0; i < num_doodads; i++, doodad++) { size += SIZEOF(xkbAnyDoodadWireDesc); if (doodad->any.type == XkbTextDoodad) { - size += _SizeCountedString(doodad->text.text); - size += _SizeCountedString(doodad->text.font); + size = (int) ((unsigned) size + _SizeCountedString(doodad->text.text)); + size = (int) ((unsigned) size + _SizeCountedString(doodad->text.font)); } else if (doodad->any.type == XkbLogoDoodad) { - size += _SizeCountedString(doodad->logo.logo_name); + size = (int) ((unsigned) size + _SizeCountedString(doodad->logo.logo_name)); } } return size; @@ -389,7 +389,7 @@ _WriteGeomKeyAliases(char *wire, XkbGeometryPtr geom) sz = geom->num_key_aliases * (XkbKeyNameLength * 2); if (sz > 0) { - memcpy(wire, (char *) geom->key_aliases, sz); + memcpy(wire, (char *) geom->key_aliases, (size_t)sz); wire += sz; } return wire; @@ -404,7 +404,7 @@ _SendSetGeometry(Display *dpy, XkbGeometryPtr geom, xkbSetGeometryReq *req) char *wire, *tbuf; sz = 0; - sz += _SizeCountedString(geom->label_font); + sz = (int) ((unsigned) (sz + _SizeCountedString(geom->label_font))); sz += _SizeGeomProperties(geom); sz += _SizeGeomColors(geom); sz += _SizeGeomShapes(geom); |