diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2022-01-19 00:45:43 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2023-04-27 14:08:46 +0200 |
commit | 4875a15ca61358a1c95b156b2279fce092451278 (patch) | |
tree | 79054df1730d4723658b02cec311bc8ba7655662 /nx-X11/lib/src/xkb/XKBSetGeom.c | |
parent | a502149a844736dcc7f7dedd7c63229c74a448ee (diff) | |
download | nx-libs-4875a15ca61358a1c95b156b2279fce092451278.tar.gz nx-libs-4875a15ca61358a1c95b156b2279fce092451278.tar.bz2 nx-libs-4875a15ca61358a1c95b156b2279fce092451278.zip |
Update libNX_X11 to upstream's libX11-1.7.3.1-10-gd60ede78
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); |