arm920t: -Wshadow warning fixes
[openocd.git] / src / target / arm920t.c
index b8ff8191e66dbe995f788417e8cdb68fd629d0a1..fe9bba7e9f225587f1cc71f46816ed812b7165c1 100644 (file)
@@ -1,3 +1,4 @@
+
 /***************************************************************************
  *   Copyright (C) 2005 by Dominic Rath                                    *
  *   Dominic.Rath@gmx.de                                                   *
@@ -509,13 +510,11 @@ static int arm920_virt2phys(struct target *target,
                uint32_t virt, uint32_t *phys)
 {
        uint32_t cb;
-       int domain;
-       uint32_t ap;
        struct arm920t_common *arm920t = target_to_arm920(target);
 
        uint32_t ret;
        int retval = armv4_5_mmu_translate_va(target,
-                       &arm920t->armv4_5_mmu, virt, &cb, &domain, &ap, &ret);
+                       &arm920t->armv4_5_mmu, virt, &cb, &ret);
        if (retval != ERROR_OK)
                return retval;
        *phys = ret;
@@ -579,15 +578,13 @@ int arm920t_write_memory(struct target *target, uint32_t address,
                 * by MMU
                 */
                uint32_t cb;
-               int domain;
-               uint32_t ap;
                uint32_t pa;
 
                /*
                 * We need physical address and cb
                 */
                retval = armv4_5_mmu_translate_va(target, &arm920t->armv4_5_mmu,
-                               address, &cb, &domain, &ap, &pa);
+                               address, &cb, &pa);
                if (retval != ERROR_OK)
                        return retval;
 
@@ -845,7 +842,7 @@ COMMAND_HANDLER(arm920t_handle_read_cache_command)
        int i;
        FILE *output;
        struct arm920t_cache_line d_cache[8][64], i_cache[8][64];
-       int segment, index;
+       int segment, index_t;
        struct reg *r;
 
        retval = arm920t_verify_pointer(CMD_CTX, arm920t);
@@ -914,12 +911,12 @@ COMMAND_HANDLER(arm920t_handle_read_cache_command)
                arm920t_write_cp15_physical(target,
                                CP15PHYS_TESTSTATE, cp15c15);
 
-               for (index = 0; index < 64; index++)
+               for (index_t = 0; index_t < 64; index_t++)
                {
                        /* Ra:
                         * r0 = index(31:26):SBZ(25:8):segment(7:5):SBZ(4:0)
                         */
-                       regs[0] = 0x0 | (segment << 5) | (index << 26);
+                       regs[0] = 0x0 | (segment << 5) | (index_t << 26);
                        arm9tdmi_write_core_regs(target, 0x1, regs);
 
                        /* set interpret mode */
@@ -953,18 +950,18 @@ COMMAND_HANDLER(arm920t_handle_read_cache_command)
                                return retval;
                        }
 
-                       d_cache[segment][index].cam = regs[9];
+                       d_cache[segment][index_t].cam = regs[9];
 
                        /* mask LFSR[6] */
                        regs[9] &= 0xfffffffe;
                        fprintf(output, "\nsegment: %i, index: %i, CAM: 0x%8.8"
                                PRIx32 ", content (%s):\n",
-                               segment, index, regs[9],
+                               segment, index_t, regs[9],
                                (regs[9] & 0x10) ? "valid" : "invalid");
 
                        for (i = 1; i < 9; i++)
                        {
-                                d_cache[segment][index].data[i] = regs[i];
+                                d_cache[segment][index_t].data[i] = regs[i];
                                 fprintf(output, "%i: 0x%8.8" PRIx32 "\n",
                                                i-1, regs[i]);
                        }
@@ -1022,12 +1019,12 @@ COMMAND_HANDLER(arm920t_handle_read_cache_command)
                arm920t_write_cp15_physical(target,
                                CP15PHYS_TESTSTATE, cp15c15);
 
-               for (index = 0; index < 64; index++)
+               for (index_t = 0; index_t < 64; index_t++)
                {
                        /* Ra:
                         * r0 = index(31:26):SBZ(25:8):segment(7:5):SBZ(4:0)
                         */
-                       regs[0] = 0x0 | (segment << 5) | (index << 26);
+                       regs[0] = 0x0 | (segment << 5) | (index_t << 26);
                        arm9tdmi_write_core_regs(target, 0x1, regs);
 
                        /* set interpret mode */
@@ -1061,18 +1058,18 @@ COMMAND_HANDLER(arm920t_handle_read_cache_command)
                                return retval;
                        }
 
-                       i_cache[segment][index].cam = regs[9];
+                       i_cache[segment][index_t].cam = regs[9];
 
                        /* mask LFSR[6] */
                        regs[9] &= 0xfffffffe;
                        fprintf(output, "\nsegment: %i, index: %i, "
                                "CAM: 0x%8.8" PRIx32 ", content (%s):\n",
-                               segment, index, regs[9],
+                               segment, index_t, regs[9],
                                (regs[9] & 0x10) ? "valid" : "invalid");
 
                        for (i = 1; i < 9; i++)
                        {
-                                i_cache[segment][index].data[i] = regs[i];
+                                i_cache[segment][index_t].data[i] = regs[i];
                                 fprintf(output, "%i: 0x%8.8" PRIx32 "\n",
                                                i-1, regs[i]);
                        }

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)