Use unsigned char variable, or cast to (unsigned char), for
tolower()/islower() and friends. Fix compiler error
array subscript has type 'char' [-Werror=char-subscripts]
Signed-off-by: Manuel Bouyer <bouyer@netbsd.org>
Reviewed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Release-Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
se++;
continue;
}
- if (tolower(*s) != tolower(*se))
+ if (tolower((unsigned char)*s) != tolower((unsigned char)*se))
break;
s++, se++;
}
{
unsigned int a, b;
int nmaskbits;
- char c;
+ unsigned char c;
int in_range;
const char *s;
/* include the type field in the symbol name, so that it gets
* compressed together */
s->len = strlen(str) + 1;
- if (islower(stype) && filename)
+ if (islower((unsigned char)stype) && filename)
s->len += strlen(filename) + 1;
s->sym = malloc(s->len + 1);
sym = SYMBOL_NAME(s);
- if (islower(stype) && filename) {
+ if (islower((unsigned char)stype) && filename) {
sym = stpcpy(sym, filename);
*sym++ = '#';
}