From 08a890e4aae307d874bd617f4dc742a56f2064a2 Mon Sep 17 00:00:00 2001 From: David Brownell Date: Sat, 26 Dec 2009 10:19:19 -0800 Subject: cygwin 1.7 build fixes It's less accepting of signed char ... insisting that e.g. tolower() not receive one as a parameter. It's probably good to phase out such usage, given the number of bugs that lurk in the vicinity (assumptions that char is unsigned), so fix these even though such usage is actually legal. Signed-off-by: David Brownell --- src/helper/jim.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/helper') diff --git a/src/helper/jim.c b/src/helper/jim.c index c04acf09..53d1a75e 100644 --- a/src/helper/jim.c +++ b/src/helper/jim.c @@ -2217,7 +2217,7 @@ static Jim_Obj *JimStringToLower(Jim_Interp *interp, Jim_Obj *strObjPtr) memcpy(buf, strObjPtr->bytes, strObjPtr->length + 1); for (i = 0; i < strObjPtr->length; i++) - buf[i] = tolower(buf[i]); + buf[i] = tolower((unsigned)buf[i]); return Jim_NewStringObjNoAlloc(interp, buf, strObjPtr->length); } @@ -2233,7 +2233,7 @@ static Jim_Obj *JimStringToUpper(Jim_Interp *interp, Jim_Obj *strObjPtr) memcpy(buf, strObjPtr->bytes, strObjPtr->length + 1); for (i = 0; i < strObjPtr->length; i++) - buf[i] = toupper(buf[i]); + buf[i] = toupper((unsigned)buf[i]); return Jim_NewStringObjNoAlloc(interp, buf, strObjPtr->length); } @@ -2347,7 +2347,7 @@ static Jim_Obj *Jim_FormatString_Inner(Jim_Interp *interp, Jim_Obj *fmtObjPtr, case '8': case '9': accum = 0; - while (isdigit(*fmt) && (fmtLen > 0)) { + while (isdigit((unsigned)*fmt) && (fmtLen > 0)) { accum = (accum * 10) + (*fmt - '0'); fmt++; fmtLen--; } -- cgit v1.2.3