(submit/fix-char-signedness) xfree86: common: xf86pciBus: fix char signess mismatch
On NetBSD gives warning:
In file included from /usr/include/ctype.h:100,
from ../hw/xfree86/common/xf86pciBus.c:35:
../hw/xfree86/common/xf86pciBus.c: In function ‘xf86ParsePciBusString’:
../hw/xfree86/common/xf86pciBus.c:286:27: warning: array subscript has type ‘char’ [-Wchar-subscripts]
286 | if (!isdigit(d[i])) {
| ^
../hw/xfree86/common/xf86pciBus.c:293:23: warning: array subscript has type ‘char’ [-Wchar-subscripts]
293 | if (!isdigit(p[i])) {
| ^
../hw/xfree86/common/xf86pciBus.c:307:23: warning: array subscript has type ‘char’ [-Wchar-subscripts]
307 | if (!isdigit(p[i])) {
| ^
../hw/xfree86/common/xf86pciBus.c:320:23: warning: array subscript has type ‘char’ [-Wchar-subscripts]
320 | if (!isdigit(p[i])) {
| ^
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
parent
3e2afb9390
commit
658962cc4c
|
|
@ -282,14 +282,14 @@ xf86ParsePciBusString(const char *busID, int *bus, int *device, int *func)
|
|||
if (d != NULL) {
|
||||
*(d++) = 0;
|
||||
for (i = 0; d[i] != 0; i++) {
|
||||
if (!isdigit(d[i])) {
|
||||
if (!isdigit((unsigned char)d[i])) {
|
||||
free(s);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
for (i = 0; p[i] != 0; i++) {
|
||||
if (!isdigit(p[i])) {
|
||||
if (!isdigit((unsigned char)p[i])) {
|
||||
free(s);
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -303,7 +303,7 @@ xf86ParsePciBusString(const char *busID, int *bus, int *device, int *func)
|
|||
return FALSE;
|
||||
}
|
||||
for (i = 0; p[i] != 0; i++) {
|
||||
if (!isdigit(p[i])) {
|
||||
if (!isdigit((unsigned char)p[i])) {
|
||||
free(s);
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -316,7 +316,7 @@ xf86ParsePciBusString(const char *busID, int *bus, int *device, int *func)
|
|||
return TRUE;
|
||||
}
|
||||
for (i = 0; p[i] != 0; i++) {
|
||||
if (!isdigit(p[i])) {
|
||||
if (!isdigit((unsigned char)p[i])) {
|
||||
free(s);
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue