This addresses a problem where the subtraction of two pointers, `endp - t`, can
in theory exceed the size of an `int`. In practice this cannot occur, but using
a more correct type squashes a -Wconversion and -Wsign-conversion warning in
this code.
{
char* endp = strchr (t, ';');
struct entities_s key, *res;
- int len;
+ size_t len;
char buf[MAXENTLEN+1];
agxbputc(xb, '&');
if (!endp) return t;
- if (((len = endp-t) > MAXENTLEN) || (len < 2)) return t;
+ if (((len = (size_t)(endp - t)) > MAXENTLEN) || (len < 2)) return t;
strncpy (buf, t, len);
buf[len] = '\0';
key.name = buf;