mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
Fix error: array subscript has type 'char'
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>
This commit is contained in:
1 parent
6e20463780
commit
e8524e4d4d
3 files changed
+4
-4
No files matched your search
@@ -1249,7 +1249,7 @@ static int qmp_error_class_to_libxl_error_code(libxl__gc *gc,
|
||||
se++;
|
||||
continue;
|
||||
}
|
||||
if (tolower(*s) != tolower(*se))
|
||||
if (tolower((unsigned char)*s) != tolower((unsigned char)*se))
|
||||
break;
|
||||
s++, se++;
|
||||
}
|
||||
|
||||
@@ -957,7 +957,7 @@ static int parse_cpumask_range(const char *mask_str, xc_cpumap_t map)
|
||||
{
|
||||
unsigned int a, b;
|
||||
int nmaskbits;
|
||||
char c;
|
||||
unsigned char c;
|
||||
int in_range;
|
||||
const char *s;
|
||||
|
||||
|
||||
+2
-2
@@ -173,11 +173,11 @@ static int read_symbol(FILE *in, struct sym_entry *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++ = '#';
|
||||
}
|
||||
|
||||