jim: more jim -Wshadow fixes that should be straightforward
authorØyvind Harboe <oyvind.harboe@zylin.com>
Mon, 14 Jun 2010 20:29:41 +0000 (22:29 +0200)
committerØyvind Harboe <oyvind.harboe@zylin.com>
Tue, 15 Jun 2010 20:45:24 +0000 (22:45 +0200)
this bunch was a bit less obvious, but looked
straightforward.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
src/helper/jim.c

index b8d856f4bd2cc6654bc4ffa35558d972957991db..8b0014f347fb44bb780de845cfee6b14146a851b 100644 (file)
@@ -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) {

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)