From 3e2afb9390b10d563e2a4c2ee5d90c6f9af0d7b5 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Tue, 2 Apr 2024 17:11:48 +0200 Subject: [PATCH] (submit/fix-char-signedness) xfree86: common: xf86Option: 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 ../hw/xfree86/common/xf86Option.c:39: ../hw/xfree86/common/xf86Option.c: In function ‘xf86NormalizeName’: ../hw/xfree86/common/xf86Option.c:915:25: warning: array subscript has type ‘char’ [-Wchar-subscripts] 915 | if (isupper(*p)) | ^ ../hw/xfree86/common/xf86Option.c:916:32: warning: array subscript has type ‘char’ [-Wchar-subscripts] 916 | *q++ = tolower(*p); | ^ Signed-off-by: Enrico Weigelt, metux IT consult --- hw/xfree86/common/xf86Option.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/xfree86/common/xf86Option.c b/hw/xfree86/common/xf86Option.c index ca538cc57..b8bab3617 100644 --- a/hw/xfree86/common/xf86Option.c +++ b/hw/xfree86/common/xf86Option.c @@ -912,8 +912,8 @@ xf86NormalizeName(const char *s) case '\t': continue; default: - if (isupper(*p)) - *q++ = tolower(*p); + if (isupper((unsigned char)*p)) + *q++ = tolower((unsigned char)*p); else *q++ = *p; }