From 661cd545262e735cdfaf7cd736a7fc2cde8613f1 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Mon, 29 Mar 2021 23:42:22 +0100 Subject: [PATCH] Fix -Wchar-subscripts warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit warning: array subscript has type ‘char’ [-Wchar-subscripts] --- Source/CParse/cscanner.c | 2 +- Source/Preprocessor/cpp.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/CParse/cscanner.c b/Source/CParse/cscanner.c index a3702704e..2113b9cc6 100644 --- a/Source/CParse/cscanner.c +++ b/Source/CParse/cscanner.c @@ -93,7 +93,7 @@ int isStructuralDoxygen(String *s) { const size_t len = strlen(structuralTags[n]); if (strncmp(slashPointer, structuralTags[n], len) == 0) { /* Take care to avoid false positives with prefixes of other tags. */ - if (slashPointer[len] == '\0' || isspace(slashPointer[len])) + if (slashPointer[len] == '\0' || isspace((int)slashPointer[len])) return 1; } } diff --git a/Source/Preprocessor/cpp.c b/Source/Preprocessor/cpp.c index 557b5482b..75bec61fd 100644 --- a/Source/Preprocessor/cpp.c +++ b/Source/Preprocessor/cpp.c @@ -113,7 +113,7 @@ static int is_digits(const String *str) { const char *s = Char(str); int isdigits = (*s != 0); while (*s) { - if (!isdigit(*s)) { + if (!isdigit((int)*s)) { isdigits = 0; break; }