(submit/fix-char-signedness) xfree86: common: xf86Bus: fix char signess mismatch

On NetBSD gives warning:

In file included from /usr/include/ctype.h:100,
                 from ../hw/xfree86/common/xf86Bus.c:36:
../hw/xfree86/common/xf86Bus.c: In function ‘StringToBusType’:
../hw/xfree86/common/xf86Bus.c:270:22: warning: array subscript has type ‘char’ [-Wchar-subscripts]
  270 |     if (isdigit(busID[0])) {
      |                      ^

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult 2024-04-02 17:10:12 +02:00
parent 5184800734
commit 856e8664fc

View File

@ -269,7 +269,7 @@ StringToBusType(const char *busID, const char **retID)
BusType ret = BUS_NONE; BusType ret = BUS_NONE;
/* If no type field, Default to PCI */ /* If no type field, Default to PCI */
if (isdigit(busID[0])) { if (isdigit((unsigned char)busID[0])) {
if (retID) if (retID)
*retID = busID; *retID = busID;
return BUS_PCI; return BUS_PCI;