summaryrefslogtreecommitdiff
path: root/src/helper
diff options
context:
space:
mode:
authorØyvind Harboe <oyvind.harboe@zylin.com>2010-06-14 22:29:41 +0200
committerØyvind Harboe <oyvind.harboe@zylin.com>2010-06-15 22:45:24 +0200
commit3c8a0e72f38e47bfc78dc7ab44ce2ec16cfac53b (patch)
tree8799c7d3c5c785ac1ee9a1eb979a0915d72ea425 /src/helper
parent2eba49b8b135fd6cbf95920f2794b411027f3d2e (diff)
downloadopenocd_libswd-3c8a0e72f38e47bfc78dc7ab44ce2ec16cfac53b.tar.gz
openocd_libswd-3c8a0e72f38e47bfc78dc7ab44ce2ec16cfac53b.tar.bz2
openocd_libswd-3c8a0e72f38e47bfc78dc7ab44ce2ec16cfac53b.tar.xz
openocd_libswd-3c8a0e72f38e47bfc78dc7ab44ce2ec16cfac53b.zip
jim: more jim -Wshadow fixes that should be straightforward
this bunch was a bit less obvious, but looked straightforward. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Diffstat (limited to 'src/helper')
-rw-r--r--src/helper/jim.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/helper/jim.c b/src/helper/jim.c
index b8d856f4..8b0014f3 100644
--- a/src/helper/jim.c
+++ b/src/helper/jim.c
@@ -3039,12 +3039,12 @@ int SetScriptFromAny(Jim_Interp *interp, struct Jim_Obj *objPtr)
JimParserInit(&parser, scriptText, scriptTextLen, initialLineNumber);
while (!JimParserEof(&parser)) {
- char *token;
+ char *token_t;
int len, type, linenr;
JimParseScript(&parser);
- token = JimParserGetToken(&parser, &len, &type, &linenr);
- ScriptObjAddToken(interp, script, token, len, type,
+ token_t = JimParserGetToken(&parser, &len, &type, &linenr);
+ ScriptObjAddToken(interp, script, token_t, len, type,
propagateSourceInfo ? script->fileName : NULL,
linenr);
}
@@ -4505,7 +4505,7 @@ void Jim_FreeInterp(Jim_Interp *i)
/* Check that the live object list is empty, otherwise
* there is a memory leak. */
if (i->liveList != NULL) {
- Jim_Obj *objPtr = i->liveList;
+ objPtr = i->liveList;
Jim_fprintf(i, i->cookie_stdout,JIM_NL "-------------------------------------" JIM_NL);
Jim_fprintf(i, i->cookie_stdout,"Objects still in the free list:" JIM_NL);
@@ -5170,7 +5170,7 @@ void UpdateStringOfList(struct Jim_Obj *objPtr)
realLength = 0;
for (i = 0; i < objPtr->internalRep.listValue.len; i++) {
int len, qlen;
- const char *strRep = Jim_GetString(ele[i], &len);
+ strRep = Jim_GetString(ele[i], &len);
char *q;
switch (quotingType[i]) {
@@ -5745,7 +5745,7 @@ void UpdateStringOfDict(struct Jim_Obj *objPtr)
realLength = 0;
for (i = 0; i < objc; i++) {
int len, qlen;
- const char *strRep = Jim_GetString(objv[i], &len);
+ strRep = Jim_GetString(objv[i], &len);
char *q;
switch (quotingType[i]) {
@@ -11030,7 +11030,6 @@ static int Jim_ProcCoreCommand(Jim_Interp *interp, int argc,
/* Check for default arguments and reduce arityMin if necessary */
while (arityMin > 1) {
- int len;
Jim_ListIndex(interp, argv[2], arityMin - 2, &argPtr, JIM_NONE);
Jim_ListLength(interp, argPtr, &len);
if (len != 2) {