From 887c4e4d5bbfdaf7c258d3fa5217901f924ce8ab Mon Sep 17 00:00:00 2001 From: Jordan Bancino Date: Sat, 15 Oct 2022 10:28:03 -0400 Subject: [PATCH] Fix some warnings generated by Cygwin's GCC. --- src/HttpServer.c | 4 ++-- src/Log.c | 2 +- src/TelodendriaConfig.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/HttpServer.c b/src/HttpServer.c index b1ee986..a81e638 100644 --- a/src/HttpServer.c +++ b/src/HttpServer.c @@ -507,14 +507,14 @@ HttpServerWorkerThread(void *args) headerPtr = line + i + 1; - while (isspace(*headerPtr)) + while (isspace((unsigned char) *headerPtr)) { headerPtr++; } for (i = lineLen - 1; i > (line + lineLen) - headerPtr; i--) { - if (!isspace(line[i])) + if (!isspace((unsigned char) line[i])) { break; } diff --git a/src/Log.c b/src/Log.c index 33b7600..f7c6107 100644 --- a/src/Log.c +++ b/src/Log.c @@ -294,7 +294,7 @@ Log(LogConfig * config, int level, const char *msg,...) if (tsLength) { fputs(tsBuffer, config->out); - if (!isspace(tsBuffer[tsLength - 1])) + if (!isspace((unsigned char) tsBuffer[tsLength - 1])) { fputc(' ', config->out); } diff --git a/src/TelodendriaConfig.c b/src/TelodendriaConfig.c index 0c846f1..dff1a1c 100644 --- a/src/TelodendriaConfig.c +++ b/src/TelodendriaConfig.c @@ -38,7 +38,7 @@ IsInteger(char *str) { while (*str) { - if (!isdigit(*str)) + if (!isdigit((unsigned char) *str)) { return 0; }