mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2026-02-23 01:40:43 -05: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);
|
||||
for (i = 0; u[i]; i++)
|
||||
u[i] = toupper(u[i]);
|
||||
u[i] = toupper((unsigned char) u[i]);
|
||||
u[i] = '\0';
|
||||
|
||||
return u;
|
||||
|
|
@ -354,7 +354,7 @@ desc_dump(char *desc, const char *fmt, ...)
|
|||
for (i = 0; desc[i]; ) {
|
||||
k = i;
|
||||
newlines = 0;
|
||||
while (desc[i] && isspace(desc[i])) {
|
||||
while (desc[i] && isspace((unsigned char) desc[i])) {
|
||||
if (desc[i] == '\n')
|
||||
newlines++;
|
||||
i++;
|
||||
|
|
@ -363,7 +363,7 @@ desc_dump(char *desc, const char *fmt, ...)
|
|||
break;
|
||||
|
||||
j = i;
|
||||
while (desc[i] && !isspace(desc[i]))
|
||||
while (desc[i] && !isspace((unsigned char) desc[i]))
|
||||
i++;
|
||||
|
||||
if (newlines > 1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue