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>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1455>
This commit is contained in:
Enrico Weigelt, metux IT consult 2024-04-02 17:10:12 +02:00 committed by Povilas Kanapickas
parent 84be5b4e9c
commit 99017bf948

View File

@ -266,7 +266,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;