os: access: fix char signess mismatch
On NetBSD gives warning:
In file included from /usr/include/ctype.h:100,
from ../include/misc.h:174,
from ../os/access.c:96:
../os/access.c: In function ‘ResetHosts’:
../os/access.c:981:49: warning: array subscript has type ‘char’ [-Wchar-subscripts]
981 | lhostname[i] = tolower(ohostname[i]);
| ^
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1455>
This commit is contained in:
parent
3b99837b78
commit
9446ae487c
|
|
@ -936,7 +936,7 @@ ResetHosts(const char *display)
|
|||
*ptr = 0;
|
||||
hostlen = strlen(ohostname) + 1;
|
||||
for (i = 0; i < hostlen; i++)
|
||||
lhostname[i] = tolower(ohostname[i]);
|
||||
lhostname[i] = tolower((unsigned char)ohostname[i]);
|
||||
hostname = ohostname;
|
||||
if (!strncmp("local:", lhostname, 6)) {
|
||||
family = FamilyLocalHost;
|
||||
|
|
|
|||
Loading…
Reference in New Issue