shithub: trueawk

Download patch

ref: b7461b63f231d2d45a5309e6ee207276e7c44a98
parent: fcc0e7b0f8eb8bdaf909b03f5b4d0f0833cf4292
author: ozan yigit <ozan.yigit@gmail.com>
date: Thu Dec 28 09:48:42 EST 2023

cast to int for isspace, isalnum et al.

--- a/b.c
+++ b/b.c
@@ -346,7 +346,7 @@
 	int i;
 
 	for (i = 0, p = *pp; i < max && isxdigit(*p); i++, p++) {
-		if (isdigit(*p))
+		if (isdigit((int) *p))
 			n = 16 * n + *p - '0';
 		else if (*p >= 'a' && *p <= 'f')
 			n = 16 * n + *p - 'a' + 10;
@@ -1389,7 +1389,7 @@
 		}
 		break;
 	case '{':
-		if (isdigit(*(prestr))) {
+		if (isdigit((int) *(prestr))) {
 			num = 0;	/* Process as a repetition */
 			n = -1; m = -1;
 			commafound = false;
--- a/lib.c
+++ b/lib.c
@@ -845,10 +845,10 @@
 {
 	const char *os = s;
 
-	if (!isalpha((uschar) *s) && *s != '_')
+	if (!isalpha((int) *s) && *s != '_')
 		return 0;
 	for ( ; *s; s++)
-		if (!(isalnum((uschar) *s) || *s == '_'))
+		if (!(isalnum((int) *s) || *s == '_'))
 			break;
 	return *s == '=' && s > os;
 }
@@ -883,7 +883,7 @@
 	if (no_trailing)
 		*no_trailing = false;
 
-	while (isspace(*s))
+	while (isspace((int) *s))
 		s++;
 
 	/* no hex floating point, sorry */
@@ -895,7 +895,7 @@
 		is_nan = (strncasecmp(s+1, "nan", 3) == 0);
 		is_inf = (strncasecmp(s+1, "inf", 3) == 0);
 		if ((is_nan || is_inf)
-		    && (isspace(s[4]) || s[4] == '\0'))
+		    && (isspace((int) s[4]) || s[4] == '\0'))
 			goto convert;
 		else if (! isdigit(s[1]) && s[1] != '.')
 			return false;
@@ -918,7 +918,7 @@
 	/*
 	 * check for trailing stuff
 	 */
-	while (isspace(*ep))
+	while (isspace((int) *ep))
 		ep++;
 
 	if (no_trailing != NULL)
--