From 4ece2801b980358ed0a81efb78b4c4cadee03f6e Mon Sep 17 00:00:00 2001 From: KaiStevenson Date: Sat, 4 Mar 2023 14:37:05 -0800 Subject: fixed compiler warnings on windows --- src/parse.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/parse.c') diff --git a/src/parse.c b/src/parse.c index f8749ac..b7596d4 100644 --- a/src/parse.c +++ b/src/parse.c @@ -82,7 +82,7 @@ symset_t* parse_symbols(char** str, int* sLine) { symbolSet->count = 0; while (1) { /* clear whitespace */ - while (!isalnum(**str) && **str != '"' && **str != '-' && **str != '(' && **str != ')' && **str != '\0') { + while (!isalnum((unsigned char)**str) && **str != '"' && **str != '-' && **str != '(' && **str != ')' && **str != '\0') { /* increment line counter if newline read */ if (**str == '\n') { (*sLine)++; @@ -126,7 +126,7 @@ symset_t* parse_symbols(char** str, int* sLine) { isFloat = 1; } /* we've hit a character that cannot be part of the symbol. parse the prior characters as the symbol name */ - else if (!isalnum(**str) && **str != '-' && **str != '(') { + else if (!isalnum((unsigned char)**str) && **str != '-' && **str != '(') { /* move the pointer back, because the close paren is needed to return the calling function */ if (**str == ')') { (*str)--; @@ -134,7 +134,7 @@ symset_t* parse_symbols(char** str, int* sLine) { (*str)++; symbolName[i] = '\0'; sym_t* symbol; - if (isalpha(symbolName[0])) { + if (isalpha((unsigned int)symbolName[0])) { /* reference */ symbol = init_sym_key(symbolName); } -- cgit v1.3.1