diff --git a/src/builtin.c b/src/builtin.c index 7d21bfb111..e39975b0a0 100644 --- a/src/builtin.c +++ b/src/builtin.c @@ -1474,7 +1474,7 @@ static jv f_strptime(jq_state *jq, jv a, jv b) { } #endif const char *end = strptime(input, fmt, &tm); - if (end == NULL || (*end != '\0' && !isspace(*end))) { + if (end == NULL || (*end != '\0' && !isspace((unsigned char)*end))) { return ret_error2(a, b, jv_string_fmt("date \"%s\" does not match format \"%s\"", input, fmt)); } jv_free(b); diff --git a/src/main.c b/src/main.c index 2f26ff2bfe..a8c217fcda 100644 --- a/src/main.c +++ b/src/main.c @@ -126,7 +126,7 @@ static void die() { } static int isoptish(const char* text) { - return text[0] == '-' && (text[1] == '-' || isalpha(text[1])); + return text[0] == '-' && (text[1] == '-' || isalpha((unsigned char)text[1])); } static int isoption(const char* text, char shortopt, const char* longopt, size_t *short_opts) {