Fix Cygwin build warnings

This commit is contained in:
Přemysl Eric Janouch 2023-07-07 09:46:04 +02:00
parent bc8867eb22
commit b3e9218b23
Signed by: p
GPG Key ID: A0420B94F92B9493
2 changed files with 3 additions and 2 deletions

4
xB.c
View File

@ -1009,7 +1009,7 @@ is_valid_plugin_name (const char *name)
if (!*name)
return false;
for (const char *p = name; *p; p++)
if (!isgraph (*p) || *p == '/')
if (!isgraph ((uint8_t) *p) || *p == '/')
return false;
return true;
}
@ -1213,7 +1213,7 @@ parse_bot_command (const char *s, const char *command, const char **following)
s += command_len;
// Expect a word boundary, so that we don't respond to invalid things
if (isalnum (*s))
if (isalnum ((uint8_t) *s))
return false;
// Ignore any initial spaces; the rest is the command's argument

1
xC.c
View File

@ -49,6 +49,7 @@ enum
#define PROGRAM_NAME "xC"
// fmemopen
#define _POSIX_C_SOURCE 200809L
#define _XOPEN_SOURCE 700
#include "common.c"