mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2026-04-02 07:15:53 -04:00
NetBSD support: Eliminate ctype-related compiler warnings.
The C standard says that the ctype functions must be used with unsigned char arguments, and NetBSD triggers -Wchar-subscript warnings. Signed-off-by: Nia Alarie <nia@NetBSD.org>
This commit is contained in:
parent
e29469463b
commit
e3521796e6
1 changed files with 3 additions and 3 deletions
|
|
@ -294,7 +294,7 @@ uppercase_dup(const char *src)
|
||||||
|
|
||||||
u = xstrdup(src);
|
u = xstrdup(src);
|
||||||
for (i = 0; u[i]; i++)
|
for (i = 0; u[i]; i++)
|
||||||
u[i] = toupper(u[i]);
|
u[i] = toupper((unsigned char) u[i]);
|
||||||
u[i] = '\0';
|
u[i] = '\0';
|
||||||
|
|
||||||
return u;
|
return u;
|
||||||
|
|
@ -354,7 +354,7 @@ desc_dump(char *desc, const char *fmt, ...)
|
||||||
for (i = 0; desc[i]; ) {
|
for (i = 0; desc[i]; ) {
|
||||||
k = i;
|
k = i;
|
||||||
newlines = 0;
|
newlines = 0;
|
||||||
while (desc[i] && isspace(desc[i])) {
|
while (desc[i] && isspace((unsigned char) desc[i])) {
|
||||||
if (desc[i] == '\n')
|
if (desc[i] == '\n')
|
||||||
newlines++;
|
newlines++;
|
||||||
i++;
|
i++;
|
||||||
|
|
@ -363,7 +363,7 @@ desc_dump(char *desc, const char *fmt, ...)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
j = i;
|
j = i;
|
||||||
while (desc[i] && !isspace(desc[i]))
|
while (desc[i] && !isspace((unsigned char) desc[i]))
|
||||||
i++;
|
i++;
|
||||||
|
|
||||||
if (newlines > 1)
|
if (newlines > 1)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue