wid = 0;
while (len > 0) {
- int err, ret;
+ int err;
wchar_t const *s_orig;
err = 0;
s_orig = s;
- ret = charset_from_unicode(&s, &len, buf, lenof(buf),
- charset, &state, &err);
+ charset_from_unicode(&s, &len, buf, lenof(buf), charset, &state, &err);
wid += wcswidth(s_orig, s - s_orig);
if (err) {
assert(len > 0 && *s);