From 9446ae487c4033c07ce02e8823a944d7e10cacd1 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Tue, 2 Apr 2024 17:25:36 +0200 Subject: [PATCH] os: access: fix char signess mismatch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: --- os/access.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/os/access.c b/os/access.c index cebd39a4f..d3ad798cc 100644 --- a/os/access.c +++ b/os/access.c @@ -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;