mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-08 13:48:03 +02:00
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>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1455>
(cherry picked from commit 43a57fc6e9)
This commit is contained in:
parent
f45707d713
commit
3e84eb32d9
1 changed files with 4 additions and 4 deletions
|
|
@ -283,14 +283,14 @@ xf86ParsePciBusString(const char *busID, int *bus, int *device, int *func)
|
||||||
if (d != NULL) {
|
if (d != NULL) {
|
||||||
*(d++) = 0;
|
*(d++) = 0;
|
||||||
for (i = 0; d[i] != 0; i++) {
|
for (i = 0; d[i] != 0; i++) {
|
||||||
if (!isdigit(d[i])) {
|
if (!isdigit((unsigned char)d[i])) {
|
||||||
free(s);
|
free(s);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (i = 0; p[i] != 0; i++) {
|
for (i = 0; p[i] != 0; i++) {
|
||||||
if (!isdigit(p[i])) {
|
if (!isdigit((unsigned char)p[i])) {
|
||||||
free(s);
|
free(s);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
@ -304,7 +304,7 @@ xf86ParsePciBusString(const char *busID, int *bus, int *device, int *func)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
for (i = 0; p[i] != 0; i++) {
|
for (i = 0; p[i] != 0; i++) {
|
||||||
if (!isdigit(p[i])) {
|
if (!isdigit((unsigned char)p[i])) {
|
||||||
free(s);
|
free(s);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
@ -317,7 +317,7 @@ xf86ParsePciBusString(const char *busID, int *bus, int *device, int *func)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
for (i = 0; p[i] != 0; i++) {
|
for (i = 0; p[i] != 0; i++) {
|
||||||
if (!isdigit(p[i])) {
|
if (!isdigit((unsigned char)p[i])) {
|
||||||
free(s);
|
free(s);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue