xserver: Branch 'master' - 9 commits
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Oct 10 14:13:18 UTC 2024
hw/xfree86/common/xf86Bus.c | 2 +-
hw/xfree86/common/xf86Configure.c | 2 +-
hw/xfree86/common/xf86Option.c | 4 ++--
hw/xfree86/common/xf86pciBus.c | 8 ++++----
hw/xfree86/parser/scan.c | 12 ++++++------
os/access.c | 2 +-
os/utils.c | 4 ++--
xkb/xkbInit.c | 8 ++++----
xkb/xkbtext.c | 12 ++++++------
9 files changed, 27 insertions(+), 27 deletions(-)
New commits:
commit e79dfb87e9eff7bb133c5277985b5168fd1ce18d
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date: Tue Apr 2 17:32:56 2024 +0200
xkb: xkbInit: fix char signess mismatch
On NetBSD gives warning:
../xkb/xkbInit.c: In function ‘XkbProcessArguments’:
../xkb/xkbInit.c:778:57: warning: array subscript has type ‘char’ [-Wchar-subscripts]
778 | if (((i + 1) < argc) && (isdigit(argv[i + 1][0]))) {
| ^
../xkb/xkbInit.c:782:61: warning: array subscript has type ‘char’ [-Wchar-subscripts]
782 | if (((i + 1) < argc) && (isdigit(argv[i + 1][0]))) {
| ^
../xkb/xkbInit.c:792:61: warning: array subscript has type ‘char’ [-Wchar-subscripts]
792 | if (((i + 1) < argc) && (isdigit(argv[i + 1][0]))) {
| ^
../xkb/xkbInit.c:799:61: warning: array subscript has type ‘char’ [-Wchar-subscripts]
799 | if (((i + 1) < argc) && (isdigit(argv[i + 1][0]))) {
| ^
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1455>
diff --git a/xkb/xkbInit.c b/xkb/xkbInit.c
index 4c12c2480..2819935eb 100644
--- a/xkb/xkbInit.c
+++ b/xkb/xkbInit.c
@@ -769,11 +769,11 @@ XkbProcessArguments(int argc, char *argv[], int i)
else {
XkbWantAccessX = 1;
- if (((i + 1) < argc) && (isdigit(argv[i + 1][0]))) {
+ if (((i + 1) < argc) && (isdigit((unsigned char)argv[i + 1][0]))) {
XkbDfltAccessXTimeout = atoi(argv[++i]);
j++;
- if (((i + 1) < argc) && (isdigit(argv[i + 1][0]))) {
+ if (((i + 1) < argc) && (isdigit((unsigned char)argv[i + 1][0]))) {
/*
* presumption that the reasonably useful range of
* values fits in 0..MAXINT since SunOS 4 doesn't
@@ -783,14 +783,14 @@ XkbProcessArguments(int argc, char *argv[], int i)
strtol(argv[++i], NULL, 16);
j++;
}
- if (((i + 1) < argc) && (isdigit(argv[i + 1][0]))) {
+ if (((i + 1) < argc) && (isdigit((unsigned char)argv[i + 1][0]))) {
if (argv[++i][0] == '1')
XkbDfltAccessXFeedback = XkbAccessXFeedbackMask;
else
XkbDfltAccessXFeedback = 0;
j++;
}
- if (((i + 1) < argc) && (isdigit(argv[i + 1][0]))) {
+ if (((i + 1) < argc) && (isdigit((unsigned char)argv[i + 1][0]))) {
XkbDfltAccessXOptions = (unsigned short)
strtol(argv[++i], NULL, 16);
j++;
commit 02be87b880f4a4fe3fe1f4ef48de35543edc0dc6
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date: Tue Apr 2 17:30:54 2024 +0200
xkb: xkbtext: fix char signess mismatch
On NetBSD gives warning:
In file included from /usr/include/ctype.h:100,
from ../xkb/xkbtext.c:32:
../xkb/xkbtext.c: In function ‘XkbAtomText’:
../xkb/xkbtext.c:94:44: warning: array subscript has type ‘char’ [-Wchar-subscripts]
94 | if ((tmp == rtrn) && (!isalpha(*tmp)))
| ^
../xkb/xkbtext.c:96:31: warning: array subscript has type ‘char’ [-Wchar-subscripts]
96 | else if (!isalnum(*tmp))
| ^
../xkb/xkbtext.c: In function ‘XkbIMWhichStateMaskText’:
../xkb/xkbtext.c:470:43: warning: array subscript has type ‘char’ [-Wchar-subscripts]
470 | buf[len + 9] = toupper(buf[len + 9]);
| ^
../xkb/xkbtext.c: In function ‘XkbControlsMaskText’:
../xkb/xkbtext.c:532:43: warning: array subscript has type ‘char’ [-Wchar-subscripts]
532 | buf[len + 3] = toupper(buf[len + 3]);
| ^
../xkb/xkbtext.c: In function ‘XkbStringText’:
../xkb/xkbtext.c:563:22: warning: array subscript has type ‘char’ [-Wchar-subscripts]
563 | if (!isprint(*in)) {
| ^
../xkb/xkbtext.c:584:21: warning: array subscript has type ‘char’ [-Wchar-subscripts]
584 | if (isprint(*in))
| ^
Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1455>
diff --git a/xkb/xkbtext.c b/xkb/xkbtext.c
index c7ed48956..018466420 100644
--- a/xkb/xkbtext.c
+++ b/xkb/xkbtext.c
@@ -90,9 +90,9 @@ XkbAtomText(Atom atm, unsigned format)
}
if (format == XkbCFile) {
for (tmp = rtrn; *tmp != '\0'; tmp++) {
- if ((tmp == rtrn) && (!isalpha(*tmp)))
+ if ((tmp == rtrn) && (!isalpha((unsigned char)*tmp)))
*tmp = '_';
- else if (!isalnum(*tmp))
+ else if (!isalnum((unsigned char)*tmp))
*tmp = '_';
}
}
@@ -466,7 +466,7 @@ XkbIMWhichStateMaskText(unsigned use_which, unsigned format)
if (len != 0)
buf[len++] = '|';
sprintf(&buf[len], "XkbIM_Use%s", imWhichNames[i]);
- buf[len + 9] = toupper(buf[len + 9]);
+ buf[len + 9] = toupper((unsigned char)buf[len + 9]);
}
else {
if (len != 0)
@@ -528,7 +528,7 @@ XkbControlsMaskText(unsigned ctrls, unsigned format)
if (len != 0)
buf[len++] = '|';
sprintf(&buf[len], "Xkb%sMask", ctrlNames[i]);
- buf[len + 3] = toupper(buf[len + 3]);
+ buf[len + 3] = toupper((unsigned char)buf[len + 3]);
}
else {
if (len != 0)
@@ -559,7 +559,7 @@ XkbStringText(char *str, unsigned format)
else if (format == XkbXKMFile)
return str;
for (ok = TRUE, len = 0, in = str; *in != '\0'; in++, len++) {
- if (!isprint(*in)) {
+ if (!isprint((unsigned char)*in)) {
ok = FALSE;
switch (*in) {
case '\n':
@@ -580,7 +580,7 @@ XkbStringText(char *str, unsigned format)
return str;
buf = tbGetBuffer(len + 1);
for (in = str, out = buf; *in != '\0'; in++) {
- if (isprint(*in))
+ if (isprint((unsigned char)*in))
*out++ = *in;
else {
*out++ = '\\';
commit bb9953db3f81bffbfdb60f09ac73b359904118b4
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date: Tue Apr 2 17:28:03 2024 +0200
os: utils: fix char signess mismatch
On NetBSD gives warning:
In file included from /usr/include/ctype.h:100,
from ../include/misc.h:174,
from ../os/utils.c:75:
../os/utils.c: In function ‘VerifyDisplayName’:
../os/utils.c:624:23: warning: array subscript has type ‘char’ [-Wchar-subscripts]
624 | if (!isdigit(d[i])) {
| ^
../os/utils.c: In function ‘ProcessCommandLine’:
../os/utils.c:942:44: warning: array subscript has type ‘char’ [-Wchar-subscripts]
942 | if ((i + 1 < argc) && (isdigit(*argv[i + 1])))
| ^
Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1455>
diff --git a/os/utils.c b/os/utils.c
index eb69980ad..b34145b1f 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -437,7 +437,7 @@ VerifyDisplayName(const char *d)
for digits, or exception of :0.0 and similar (two decimal points max)
*/
for (i = 0; i < strlen(d); i++) {
- if (!isdigit(d[i])) {
+ if (!isdigit((unsigned char)d[i])) {
if (d[i] != '.' || period_found)
return 0;
period_found = TRUE;
@@ -753,7 +753,7 @@ ProcessCommandLine(int argc, char *argv[])
else if (strcmp(argv[i], "-terminate") == 0) {
dispatchExceptionAtReset = DE_TERMINATE;
terminateDelay = -1;
- if ((i + 1 < argc) && (isdigit(*argv[i + 1])))
+ if ((i + 1 < argc) && (isdigit((unsigned char)*argv[i + 1])))
terminateDelay = atoi(argv[++i]);
terminateDelay = max(0, terminateDelay);
}
commit 9446ae487c4033c07ce02e8823a944d7e10cacd1
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date: Tue Apr 2 17:25:36 2024 +0200
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>
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;
commit 3b99837b78dc1499fee223a71ca7e225d4b261a9
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date: Tue Apr 2 17:17:13 2024 +0200
xfree86: parser: scan: fix char signess mismatch
On NetBSD gives warning:
In file included from /usr/include/ctype.h:100,
from ../hw/xfree86/parser/scan.c:58:
../hw/xfree86/parser/scan.c: In function ‘xf86getToken’:
../hw/xfree86/parser/scan.c:343:50: warning: array subscript has type ‘char’ [-Wchar-subscripts]
343 | else if ((c == ',') && !isalpha(configBuf[configPos])) {
| ^
../hw/xfree86/parser/scan.c:346:50: warning: array subscript has type ‘char’ [-Wchar-subscripts]
346 | else if ((c == '-') && !isalpha(configBuf[configPos])) {
| ^
../hw/xfree86/parser/scan.c: In function ‘xf86nameCompare’:
../hw/xfree86/parser/scan.c:1031:19: warning: array subscript has type ‘char’ [-Wchar-subscripts]
1031 | c1 = (isupper(*s1) ? tolower(*s1) : *s1);
| ^
../hw/xfree86/parser/scan.c:1031:34: warning: array subscript has type ‘char’ [-Wchar-subscripts]
1031 | c1 = (isupper(*s1) ? tolower(*s1) : *s1);
| ^
../hw/xfree86/parser/scan.c:1032:19: warning: array subscript has type ‘char’ [-Wchar-subscripts]
1032 | c2 = (isupper(*s2) ? tolower(*s2) : *s2);
| ^
../hw/xfree86/parser/scan.c:1032:34: warning: array subscript has type ‘char’ [-Wchar-subscripts]
1032 | c2 = (isupper(*s2) ? tolower(*s2) : *s2);
| ^
../hw/xfree86/parser/scan.c:1042:23: warning: array subscript has type ‘char’ [-Wchar-subscripts]
1042 | c1 = (isupper(*s1) ? tolower(*s1) : *s1);
| ^
../hw/xfree86/parser/scan.c:1042:38: warning: array subscript has type ‘char’ [-Wchar-subscripts]
1042 | c1 = (isupper(*s1) ? tolower(*s1) : *s1);
| ^
../hw/xfree86/parser/scan.c:1043:23: warning: array subscript has type ‘char’ [-Wchar-subscripts]
1043 | c2 = (isupper(*s2) ? tolower(*s2) : *s2);
| ^
../hw/xfree86/parser/scan.c:1043:38: warning: array subscript has type ‘char’ [-Wchar-subscripts]
1043 | c2 = (isupper(*s2) ? tolower(*s2) : *s2);
| ^
Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1455>
diff --git a/hw/xfree86/parser/scan.c b/hw/xfree86/parser/scan.c
index f4645f9d9..bf5a8d13b 100644
--- a/hw/xfree86/parser/scan.c
+++ b/hw/xfree86/parser/scan.c
@@ -340,10 +340,10 @@ xf86getToken(const xf86ConfigSymTabRec * tab)
}
/* GJA -- handle '-' and ',' * Be careful: "-hsync" is a keyword. */
- else if ((c == ',') && !isalpha(configBuf[configPos])) {
+ else if ((c == ',') && !isalpha((unsigned char)configBuf[configPos])) {
return COMMA;
}
- else if ((c == '-') && !isalpha(configBuf[configPos])) {
+ else if ((c == '-') && !isalpha((unsigned char)configBuf[configPos])) {
return DASH;
}
@@ -1034,8 +1034,8 @@ xf86nameCompare(const char *s1, const char *s2)
s1++;
while (*s2 == '_' || *s2 == ' ' || *s2 == '\t')
s2++;
- c1 = (isupper(*s1) ? tolower(*s1) : *s1);
- c2 = (isupper(*s2) ? tolower(*s2) : *s2);
+ c1 = (isupper((unsigned char)*s1) ? tolower((unsigned char)*s1) : *s1);
+ c2 = (isupper((unsigned char)*s2) ? tolower((unsigned char)*s2) : *s2);
while (c1 == c2) {
if (c1 == '\0')
return 0;
@@ -1045,8 +1045,8 @@ xf86nameCompare(const char *s1, const char *s2)
s1++;
while (*s2 == '_' || *s2 == ' ' || *s2 == '\t')
s2++;
- c1 = (isupper(*s1) ? tolower(*s1) : *s1);
- c2 = (isupper(*s2) ? tolower(*s2) : *s2);
+ c1 = (isupper((unsigned char)*s1) ? tolower((unsigned char)*s1) : *s1);
+ c2 = (isupper((unsigned char)*s2) ? tolower((unsigned char)*s2) : *s2);
}
return c1 - c2;
}
commit 7830b007e47b4e79c490a8f572951dee7b4b5a57
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date: Tue Apr 2 17:34:06 2024 +0200
xfree86: common: xf86Configure: fix char signess mismatch
On NetBSD gives warning:
../hw/xfree86/common/xf86Configure.c: In function ‘xf86AddBusDeviceToConfigure’:
../hw/xfree86/common/xf86Configure.c:125:50: warning: array subscript has type ‘char’ [-Wchar-subscripts]
125 | for (j = 0; (lower_driver[j] = tolower(driver[j])); j++);
| ^
Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1455>
diff --git a/hw/xfree86/common/xf86Configure.c b/hw/xfree86/common/xf86Configure.c
index 052794efe..1844125a9 100644
--- a/hw/xfree86/common/xf86Configure.c
+++ b/hw/xfree86/common/xf86Configure.c
@@ -125,7 +125,7 @@ xf86AddBusDeviceToConfigure(const char *driver, BusType bus, void *busData,
/* Fill in what we know, converting the driver name to lower case */
lower_driver = XNFalloc(strlen(driver) + 1);
- for (j = 0; (lower_driver[j] = tolower(driver[j])); j++);
+ for (j = 0; (lower_driver[j] = tolower((unsigned char)driver[j])); j++);
DevToConfig[i].GDev.driver = lower_driver;
switch (bus) {
commit 43a57fc6e924acdf911106ea26d3a39295bf4b9e
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date: Tue Apr 2 17:14:00 2024 +0200
xfree86: common: xf86pciBus: fix char signess mismatch
On NetBSD gives warning:
In file included from /usr/include/ctype.h:100,
from ../hw/xfree86/common/xf86pciBus.c:35:
../hw/xfree86/common/xf86pciBus.c: In function ‘xf86ParsePciBusString’:
../hw/xfree86/common/xf86pciBus.c:286:27: warning: array subscript has type ‘char’ [-Wchar-subscripts]
286 | if (!isdigit(d[i])) {
| ^
../hw/xfree86/common/xf86pciBus.c:293:23: warning: array subscript has type ‘char’ [-Wchar-subscripts]
293 | if (!isdigit(p[i])) {
| ^
../hw/xfree86/common/xf86pciBus.c:307:23: warning: array subscript has type ‘char’ [-Wchar-subscripts]
307 | if (!isdigit(p[i])) {
| ^
../hw/xfree86/common/xf86pciBus.c:320:23: warning: array subscript has type ‘char’ [-Wchar-subscripts]
320 | if (!isdigit(p[i])) {
| ^
Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1455>
diff --git a/hw/xfree86/common/xf86pciBus.c b/hw/xfree86/common/xf86pciBus.c
index d2af996da..3a9ace9ab 100644
--- a/hw/xfree86/common/xf86pciBus.c
+++ b/hw/xfree86/common/xf86pciBus.c
@@ -282,14 +282,14 @@ xf86ParsePciBusString(const char *busID, int *bus, int *device, int *func)
if (d != NULL) {
*(d++) = 0;
for (i = 0; d[i] != 0; i++) {
- if (!isdigit(d[i])) {
+ if (!isdigit((unsigned char)d[i])) {
free(s);
return FALSE;
}
}
}
for (i = 0; p[i] != 0; i++) {
- if (!isdigit(p[i])) {
+ if (!isdigit((unsigned char)p[i])) {
free(s);
return FALSE;
}
@@ -303,7 +303,7 @@ xf86ParsePciBusString(const char *busID, int *bus, int *device, int *func)
return FALSE;
}
for (i = 0; p[i] != 0; i++) {
- if (!isdigit(p[i])) {
+ if (!isdigit((unsigned char)p[i])) {
free(s);
return FALSE;
}
@@ -316,7 +316,7 @@ xf86ParsePciBusString(const char *busID, int *bus, int *device, int *func)
return TRUE;
}
for (i = 0; p[i] != 0; i++) {
- if (!isdigit(p[i])) {
+ if (!isdigit((unsigned char)p[i])) {
free(s);
return FALSE;
}
commit 1f861bbb9d61c89dcbe770484c41f7296382ed4a
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date: Tue Apr 2 17:11:48 2024 +0200
xfree86: common: xf86Option: fix char signess mismatch
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 <info at metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1455>
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;
}
commit 99017bf94882180ea178df2446bb95a684866e5c
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date: Tue Apr 2 17:10:12 2024 +0200
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 at metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1455>
diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c
index 5e5cdb1a6..7d778c4dd 100644
--- a/hw/xfree86/common/xf86Bus.c
+++ b/hw/xfree86/common/xf86Bus.c
@@ -266,7 +266,7 @@ StringToBusType(const char *busID, const char **retID)
BusType ret = BUS_NONE;
/* If no type field, Default to PCI */
- if (isdigit(busID[0])) {
+ if (isdigit((unsigned char)busID[0])) {
if (retID)
*retID = busID;
return BUS_PCI;
More information about the xorg-commit
mailing list