summaryrefslogtreecommitdiff
path: root/src/helper
diff options
context:
space:
mode:
authorDavid Brownell <dbrownell@users.sourceforge.net>2009-12-26 10:19:19 -0800
committerDavid Brownell <dbrownell@users.sourceforge.net>2009-12-26 10:19:19 -0800
commit08a890e4aae307d874bd617f4dc742a56f2064a2 (patch)
treeaa5152066057bc3916dd25d0960fa755471628ff /src/helper
parentf9d203d1e6656041affc09528ac373a2b32497ee (diff)
downloadopenocd+libswd-08a890e4aae307d874bd617f4dc742a56f2064a2.tar.gz
openocd+libswd-08a890e4aae307d874bd617f4dc742a56f2064a2.tar.bz2
openocd+libswd-08a890e4aae307d874bd617f4dc742a56f2064a2.tar.xz
openocd+libswd-08a890e4aae307d874bd617f4dc742a56f2064a2.zip
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 <dbrownell@users.sourceforge.net>
Diffstat (limited to 'src/helper')
-rw-r--r--src/helper/jim.c6
1 files changed, 3 insertions, 3 deletions
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--;
}