Prevent more warnings

This commit is contained in:
twinaphex 2020-07-23 05:24:33 +02:00
parent d72b118a2d
commit 128a65cc4c
4 changed files with 9 additions and 9 deletions

View File

@ -29,7 +29,7 @@ static int rc_parse_operand_lua(rc_operand_t* self, const char** memaddr, rc_par
return RC_INVALID_LUA_OPERAND;
}
if (!isalpha(*aux)) {
if (!isalpha((unsigned char)*aux)) {
return RC_INVALID_LUA_OPERAND;
}
@ -37,7 +37,7 @@ static int rc_parse_operand_lua(rc_operand_t* self, const char** memaddr, rc_par
id = aux;
#endif
while (isalnum(*aux) || *aux == '_') {
while (isalnum((unsigned char)*aux) || *aux == '_') {
aux++;
}

View File

@ -30,7 +30,7 @@ static const char* rc_parse_line(const char* line, const char** end) {
if (endline > line && endline[-1] == '\r')
--endline;
} else {
while (endline > line && isspace(endline[-1]))
while (endline > line && isspace((unsigned char)endline[-1]))
--endline;
}
@ -237,7 +237,7 @@ static const char* rc_parse_richpresence_lookup(rc_richpresence_lookup_t* lookup
else
key = strtoul(&number[0], &endptr, 10);
if (*endptr && !isspace(*endptr)) {
if (*endptr && !isspace((unsigned char)*endptr)) {
parse->offset = RC_INVALID_CONST_OPERAND;
return nextline;
}

View File

@ -116,7 +116,7 @@ void rc_parse_legacy_value(rc_value_t* self, const char** memaddr, rc_parse_stat
}
else {
/* if it looks like a floating point number, add the 'f' prefix */
while (isdigit(*buffer_ptr))
while (isdigit((unsigned char)*buffer_ptr))
++buffer_ptr;
if (*buffer_ptr == '.')
*ptr++ = 'f';

View File

@ -882,13 +882,13 @@ static int rc_hash_psx(char hash[33], const char* path)
if (strncmp(ptr, "BOOT", 4) == 0)
{
ptr += 4;
while (isspace(*ptr))
while (isspace((unsigned char)*ptr))
++ptr;
if (*ptr == '=')
{
++ptr;
while (isspace(*ptr))
while (isspace((unsigned char)*ptr))
++ptr;
if (strncmp(ptr, "cdrom:", 6) == 0)
@ -897,7 +897,7 @@ static int rc_hash_psx(char hash[33], const char* path)
++ptr;
start = ptr;
while (!isspace(*ptr) && *ptr != ';')
while (!isspace((unsigned char)*ptr) && *ptr != ';')
++ptr;
size = (unsigned)(ptr - start);
@ -1237,7 +1237,7 @@ static const char* rc_hash_get_first_item_from_playlist(const char* path)
next = ptr;
/* remove trailing whitespace - especially '\r' */
while (ptr > start && isspace(ptr[-1]))
while (ptr > start && isspace((unsigned char)ptr[-1]))
--ptr;
/* if we found a non-empty line, break out of the loop to process it */