]> git.sur5r.net Git - openocd/commitdiff
Fix "unused variable" warnings (errors) detected with GCC 4.7.0 - trivial fixes
authorFreddie Chopin <freddie_chopin@op.pl>
Fri, 3 Jun 2011 20:10:03 +0000 (22:10 +0200)
committerØyvind Harboe <oyvind.harboe@zylin.com>
Sat, 4 Jun 2011 07:35:13 +0000 (09:35 +0200)
22 files changed:
src/flash/nor/core.c
src/flash/nor/em357.c
src/flash/nor/pic32mx.c
src/flash/nor/stm32x.c
src/flash/nor/str9x.c
src/pld/virtex2.c
src/rtos/rtos.c
src/server/gdb_server.c
src/svf/svf.c
src/target/arm720t.c
src/target/arm920t.c
src/target/arm926ejs.c
src/target/arm946e.c
src/target/arm_adi_v5.c
src/target/arm_disassembler.c
src/target/armv4_5.c
src/target/breakpoints.c
src/target/dsp563xx.c
src/target/embeddedice.c
src/target/mips32.c
src/target/mips32_pracc.c
src/target/smp.c

index ab1bf0318ef826da45f732abc18481d144f853fc..4b5fe7dd8471c9c941cf0467bfe49babcd37b885 100644 (file)
@@ -621,7 +621,6 @@ int flash_write_unlock(struct target *target, struct image *image,
        {
                uint32_t buffer_size;
                uint8_t *buffer;
-               int section_first;
                int section_last;
                uint32_t run_address = sections[section]->base_address + section_offset;
                uint32_t run_size = sections[section]->size - section_offset;
@@ -649,7 +648,6 @@ int flash_write_unlock(struct target *target, struct image *image,
                }
 
                /* collect consecutive sections which fall into the same bank */
-               section_first = section;
                section_last = section;
                padding[section] = 0;
                while ((run_address + run_size - 1 < c->base + c->size - 1)
index 8a3cf4c2bbfb309c9028fcf18d06367c32e62d97..a62be6afa5280855bd83461d534227fc10030ec0 100644 (file)
@@ -813,7 +813,6 @@ COMMAND_HANDLER(em357_handle_lock_command)
 COMMAND_HANDLER(em357_handle_unlock_command)
 {
        struct target *target = NULL;
-       struct em357_flash_bank *em357_info = NULL;
 
        if (CMD_ARGC < 1)
        {
@@ -826,8 +825,6 @@ COMMAND_HANDLER(em357_handle_unlock_command)
        if (ERROR_OK != retval)
                return retval;
 
-       em357_info = bank->driver_priv;
-
        target = bank->target;
 
        if (target->state != TARGET_HALTED)
index a8392eb8137e82f0910c287452d413f58ad2b8b9..69321ac3eba9e9defa4c4c3a9cabb01bd7b7f3f0 100644 (file)
@@ -313,11 +313,8 @@ static int pic32mx_erase(struct flash_bank *bank, int first, int last)
 
 static int pic32mx_protect(struct flash_bank *bank, int set, int first, int last)
 {
-       struct pic32mx_flash_bank *pic32mx_info = NULL;
        struct target *target = bank->target;
 
-       pic32mx_info = bank->driver_priv;
-
        if (target->state != TARGET_HALTED)
        {
                LOG_ERROR("Target not halted");
index 3914d25c2f4765b86c2b550c1af2483c03686c81..b4300bef32aaa0d8585954021b7a771aad29889b 100644 (file)
@@ -1217,7 +1217,6 @@ COMMAND_HANDLER(stm32x_handle_lock_command)
 COMMAND_HANDLER(stm32x_handle_unlock_command)
 {
        struct target *target = NULL;
-       struct stm32x_flash_bank *stm32x_info = NULL;
 
        if (CMD_ARGC < 1)
        {
@@ -1230,8 +1229,6 @@ COMMAND_HANDLER(stm32x_handle_unlock_command)
        if (ERROR_OK != retval)
                return retval;
 
-       stm32x_info = bank->driver_priv;
-
        target = bank->target;
 
        if (target->state != TARGET_HALTED)
index 303daa045ae823f41a44e4b4a171ca312b416d85..61a438fc96dbf7e72f6c89485e9ac58f161c555a 100644 (file)
@@ -681,7 +681,6 @@ static int get_str9x_info(struct flash_bank *bank, char *buf, int buf_size)
 
 COMMAND_HANDLER(str9x_handle_flash_config_command)
 {
-       struct str9x_flash_bank *str9x_info;
        struct target *target = NULL;
 
        if (CMD_ARGC < 5)
@@ -700,8 +699,6 @@ COMMAND_HANDLER(str9x_handle_flash_config_command)
        COMMAND_PARSE_NUMBER(u32, CMD_ARGV[3], bbadr);
        COMMAND_PARSE_NUMBER(u32, CMD_ARGV[4], nbbadr);
 
-       str9x_info = bank->driver_priv;
-
        target = bank->target;
 
        if (bank->target->state != TARGET_HALTED)
index f4657bcf48670636f74cf25b5233436592b86d52..fdaeb61ebf09fad74e6de8c4267fc7adb2265ad8 100644 (file)
@@ -175,7 +175,6 @@ static int virtex2_load(struct pld_device *pld_device, const char *filename)
 COMMAND_HANDLER(virtex2_handle_read_stat_command)
 {
        struct pld_device *device;
-       struct virtex2_pld_device *virtex2_info;
        uint32_t status;
 
        if (CMD_ARGC < 1)
@@ -193,8 +192,6 @@ COMMAND_HANDLER(virtex2_handle_read_stat_command)
                return ERROR_OK;
        }
 
-       virtex2_info = device->driver_priv;
-
        virtex2_read_stat(device, &status);
 
        command_print(CMD_CTX, "virtex2 status register: 0x%8.8" PRIx32 "", status);
index 818a97937a6be832e69f351736bf2b062fced84f..263795c6d89d928af5b85ab189d6efd33ea8a9c8 100644 (file)
@@ -314,15 +314,14 @@ int gdb_thread_packet(struct connection *connection, struct target *target, char
                                int symbol_num;
 
                                char* found = strstr( packet, "qSymbol::" );
-                               int numconv;
                                if (0 == found )
                                {
-                                       numconv =sscanf(packet, "qSymbol:%" SCNx64 ":%s", &value, hex_name_str);
+                                       sscanf(packet, "qSymbol:%" SCNx64 ":%s", &value, hex_name_str);
                                }
                                else
                                {
                                        // No value returned by GDB - symbol was not found
-                                       numconv =sscanf(packet, "qSymbol::%s", hex_name_str);
+                                       sscanf(packet, "qSymbol::%s", hex_name_str);
                                }
                                name_str = (char*) malloc( 1+ strlen(hex_name_str) / 2 );
 
index b29ee4f84f3fd090251a62defe4582cc0485d05d..b6921ff25f304d5ff52891649d7096fec90b4036 100644 (file)
@@ -1731,11 +1731,10 @@ static int gdb_memory_map(struct connection *connection,
        for (i = 0; i < flash_get_bank_count(); i++) {
                int j;
                unsigned sector_size = 0;
-               uint32_t start, end;
+               uint32_t start;
 
                p = banks[i];
                start = p->base;
-               end = p->base + p->size;
 
                if (ram_start < p->base)
                        xml_printf(&retval, &xml, &pos, &size,
index 64be127013d6d623940abe54244ec4dc3b78499c..bb3f780163cc590e069a3a1c6edf4dba4b573891 100644 (file)
@@ -653,7 +653,7 @@ static int svf_read_command_from_file(FILE * fd)
        unsigned char ch;
        int i = 0;
        size_t cmd_pos = 0;
-       int cmd_ok = 0, slash = 0, comment = 0;
+       int cmd_ok = 0, slash = 0;
 
        if (svf_getline (&svf_read_line, &svf_read_line_size, svf_fd) <= 0)
        {
@@ -699,7 +699,6 @@ static int svf_read_command_from_file(FILE * fd)
                        i = -1;
                case '\r':
                        slash = 0;
-                       comment = 0;
                        /* Don't save '\r' and '\n' if no data is parsed */
                        if (!cmd_pos)
                                break;
@@ -1507,13 +1506,12 @@ static int svf_run_command(struct command_context *cmd_ctx, char *cmd_str)
                {
 #if 1
                        /* FIXME handle statemove failures */
-                       int retval;
                        uint32_t min_usec = 1000000 * min_time;
 
                        // enter into run_state if necessary
                        if (cmd_queue_cur_state != svf_para.runtest_run_state)
                        {
-                               retval = svf_add_statemove(svf_para.runtest_run_state);
+                               svf_add_statemove(svf_para.runtest_run_state);
                        }
 
                        // add clocks and/or min wait
@@ -1530,7 +1528,7 @@ static int svf_run_command(struct command_context *cmd_ctx, char *cmd_str)
                        // move to end_state if necessary
                        if (svf_para.runtest_end_state != svf_para.runtest_run_state)
                        {
-                               retval = svf_add_statemove(svf_para.runtest_end_state);
+                               svf_add_statemove(svf_para.runtest_end_state);
                        }
 #else
                        if (svf_para.runtest_run_state != TAP_IDLE)
index 76862ed5b13494856aad45e6f375f0036a89d94b..b41fbeccc5598b0d033e8d125b76264d09d3bad5 100644 (file)
@@ -253,15 +253,12 @@ static int arm720t_verify_pointer(struct command_context *cmd_ctx,
 static int arm720t_arch_state(struct target *target)
 {
        struct arm720t_common *arm720t = target_to_arm720(target);
-       struct arm *armv4_5;
 
        static const char *state[] =
        {
                "disabled", "enabled"
        };
 
-       armv4_5 = &arm720t->arm7_9_common.armv4_5_common;
-
        arm_arch_state(target);
        LOG_USER("MMU: %s, Cache: %s",
                         state[arm720t->armv4_5_mmu.mmu_enabled],
@@ -466,13 +463,11 @@ COMMAND_HANDLER(arm720t_handle_cp15_command)
        int retval;
        struct target *target = get_current_target(CMD_CTX);
        struct arm720t_common *arm720t = target_to_arm720(target);
-       struct arm_jtag *jtag_info;
 
        retval = arm720t_verify_pointer(CMD_CTX, arm720t);
        if (retval != ERROR_OK)
                return retval;
 
-       jtag_info = &arm720t->arm7_9_common.jtag_info;
 
        if (target->state != TARGET_HALTED)
        {
index 210c253d9ff258908f8a6d284915117c883b0c1f..f057d7b9b485eb3e101cfb221a354127955d47ab 100644 (file)
@@ -533,7 +533,6 @@ int arm920t_arch_state(struct target *target)
        };
 
        struct arm920t_common *arm920t = target_to_arm920(target);
-       struct arm *armv4_5;
 
        if (arm920t->common_magic != ARM920T_COMMON_MAGIC)
        {
@@ -541,8 +540,6 @@ int arm920t_arch_state(struct target *target)
                return ERROR_TARGET_INVALID;
        }
 
-       armv4_5 = &arm920t->arm7_9_common.armv4_5_common;
-
        arm_arch_state(target);
        LOG_USER("MMU: %s, D-Cache: %s, I-Cache: %s",
                 state[arm920t->armv4_5_mmu.mmu_enabled],
@@ -898,7 +895,6 @@ COMMAND_HANDLER(arm920t_handle_read_cache_command)
        uint32_t C15_C_D_Ind, C15_C_I_Ind;
        int i;
        FILE *output;
-       struct arm920t_cache_line d_cache[8][64], i_cache[8][64];
        int segment, index_t;
        struct reg *r;
 
@@ -1007,8 +1003,6 @@ COMMAND_HANDLER(arm920t_handle_read_cache_command)
                                return retval;
                        }
 
-                       d_cache[segment][index_t].cam = regs[9];
-
                        /* mask LFSR[6] */
                        regs[9] &= 0xfffffffe;
                        fprintf(output, "\nsegment: %i, index: %i, CAM: 0x%8.8"
@@ -1018,7 +1012,6 @@ COMMAND_HANDLER(arm920t_handle_read_cache_command)
 
                        for (i = 1; i < 9; i++)
                        {
-                                d_cache[segment][index_t].data[i] = regs[i];
                                 fprintf(output, "%i: 0x%8.8" PRIx32 "\n",
                                                i-1, regs[i]);
                        }
@@ -1115,8 +1108,6 @@ COMMAND_HANDLER(arm920t_handle_read_cache_command)
                                return retval;
                        }
 
-                       i_cache[segment][index_t].cam = regs[9];
-
                        /* mask LFSR[6] */
                        regs[9] &= 0xfffffffe;
                        fprintf(output, "\nsegment: %i, index: %i, "
@@ -1126,7 +1117,6 @@ COMMAND_HANDLER(arm920t_handle_read_cache_command)
 
                        for (i = 1; i < 9; i++)
                        {
-                                i_cache[segment][index_t].data[i] = regs[i];
                                 fprintf(output, "%i: 0x%8.8" PRIx32 "\n",
                                                i-1, regs[i]);
                        }
index c72fe1051b3e98878dae70a17b3f6727150b3fae..873e9a033e73b7029a64b8014b7482a33b19e391 100644 (file)
@@ -536,7 +536,6 @@ int arm926ejs_arch_state(struct target *target)
        };
 
        struct arm926ejs_common *arm926ejs = target_to_arm926(target);
-       struct arm *armv4_5;
 
        if (arm926ejs->common_magic != ARM926EJS_COMMON_MAGIC)
        {
@@ -544,8 +543,6 @@ int arm926ejs_arch_state(struct target *target)
                return ERROR_TARGET_INVALID;
        }
 
-       armv4_5 = &arm926ejs->arm7_9_common.armv4_5_common;
-
        arm_arch_state(target);
        LOG_USER("MMU: %s, D-Cache: %s, I-Cache: %s",
                         state[arm926ejs->armv4_5_mmu.mmu_enabled],
index 092271858fed4a8719d06298635fdaf87e620f6d..d9d953d1511f406ad7737dc14f4afc1b6483fd11 100644 (file)
@@ -383,7 +383,6 @@ uint32_t arm946e_invalidate_dcache(struct target *target, uint32_t address,
        uint32_t shift = 0;
        uint32_t cur_addr = 0x0;
        uint32_t cp15_idx, set, way, dtag;
-       int nb_idx;
        uint32_t i = 0;
        int retval;
 
@@ -403,7 +402,6 @@ uint32_t arm946e_invalidate_dcache(struct target *target, uint32_t address,
                        shift = csize - 0x3; /* Now 0 = 4KB, 1 = 8KB, ... */
 
                csize = 1 << (12 + shift);
-               nb_idx = (csize / 32);
 
                set = (cur_addr >> 5) & 0xff;   /* set field is 8 bits long */
 
index cd6e5deb7413a57f447931ed1d64abe273aff1a3..f8a2e2278fc33c000e8ce798f04e4846a1dfe769 100644 (file)
@@ -1088,7 +1088,7 @@ int dap_get_debugbase(struct adiv5_dap *dap, int ap,
 {
        uint32_t ap_old;
        int retval;
-       uint32_t dbgbase, apid, idcode;
+       uint32_t dbgbase, apid;
 
        /* AP address is in bits 31:24 of DP_SELECT */
        if (ap >= 256)
@@ -1110,10 +1110,8 @@ int dap_get_debugbase(struct adiv5_dap *dap, int ap,
        /* Excavate the device ID code */
        struct jtag_tap *tap = dap->jtag_info->tap;
        while (tap != NULL) {
-               if (tap->hasidcode) {
-                       idcode = tap->idcode;
+               if (tap->hasidcode)
                        break;
-               }
                tap = tap->next_tap;
        }
        if (tap == NULL || !tap->hasidcode)
index 10720f45efe19daf33c384b0ef12e4bc2d8cfc6f..36566c9932ec725a52814100e1fbfceb5429cdec 100644 (file)
@@ -300,7 +300,7 @@ static int evaluate_ldc_stc_mcrr_mrrc(uint32_t opcode,
        else /* LDC or STC */
        {
                uint8_t CRd, Rn, offset;
-               uint8_t U, N;
+               uint8_t U;
                char *mnemonic;
                char addressing_mode[32];
 
@@ -321,7 +321,6 @@ static int evaluate_ldc_stc_mcrr_mrrc(uint32_t opcode,
                }
 
                U = (opcode & 0x00800000) >> 23;
-               N = (opcode & 0x00400000) >> 22;
 
                /* addressing modes */
                if ((opcode & 0x01200000) == 0x01000000) /* offset */
index ac7f6236ed5824ca578783349bf2b021efc88625..ef9b8397aa2ef56f7c5171c99374026e84f4b29f 100644 (file)
@@ -612,7 +612,6 @@ COMMAND_HANDLER(handle_armv4_5_reg_command)
 {
        struct target *target = get_current_target(CMD_CTX);
        struct arm *armv4_5 = target_to_arm(target);
-       unsigned num_regs;
        struct reg *regs;
 
        if (!is_arm(armv4_5))
@@ -645,7 +644,6 @@ COMMAND_HANDLER(handle_armv4_5_reg_command)
                return ERROR_FAIL;
        }
 
-       num_regs = armv4_5->core_cache->num_regs;
        regs = armv4_5->core_cache->reg_list;
 
        for (unsigned mode = 0; mode < ARRAY_SIZE(arm_mode_data); mode++) {
index 80f98dc1101d72df063558e898b14bced1cb68f7..e6eb673893ba6c471b6327924efeac15c71060e7 100644 (file)
@@ -159,13 +159,11 @@ static void breakpoint_free(struct target *target, struct breakpoint *breakpoint
 void breakpoint_remove_internal(struct target *target, uint32_t address)
 {
        struct breakpoint *breakpoint = target->breakpoints;
-       struct breakpoint **breakpoint_p = &target->breakpoints;
 
        while (breakpoint)
        {
                if (breakpoint->address == address)
                        break;
-               breakpoint_p = &breakpoint->next;
                breakpoint = breakpoint->next;
        }
 
@@ -332,13 +330,11 @@ static void watchpoint_free(struct target *target, struct watchpoint *watchpoint
 void watchpoint_remove(struct target *target, uint32_t address)
 {
        struct watchpoint *watchpoint = target->watchpoints;
-       struct watchpoint **watchpoint_p = &target->watchpoints;
 
        while (watchpoint)
        {
                if (watchpoint->address == address)
                        break;
-               watchpoint_p = &watchpoint->next;
                watchpoint = watchpoint->next;
        }
 
index 82cd8be59891e5f2ee9a5ecc2e58044acc30a14f..5290b637751002ee7fdb694c74c9d4761938290b 100644 (file)
@@ -349,13 +349,11 @@ static int dsp563xx_get_gdb_reg_list(struct target *target, struct reg **reg_lis
 static int dsp563xx_read_core_reg(struct target *target, int num)
 {
        uint32_t reg_value;
-       struct dsp563xx_core_reg *dsp563xx_core_reg;
        struct dsp563xx_common *dsp563xx = target_to_dsp563xx(target);
 
        if ((num < 0) || (num >= DSP563XX_NUMCOREREGS))
                return ERROR_INVALID_ARGUMENTS;
 
-       dsp563xx_core_reg = dsp563xx->core_cache->reg_list[num].arch_info;
        reg_value = dsp563xx->core_regs[num];
        buf_set_u32(dsp563xx->core_cache->reg_list[num].value, 0, 32, reg_value);
        dsp563xx->core_cache->reg_list[num].valid = 1;
@@ -367,14 +365,12 @@ static int dsp563xx_read_core_reg(struct target *target, int num)
 static int dsp563xx_write_core_reg(struct target *target, int num)
 {
        uint32_t reg_value;
-       struct dsp563xx_core_reg *dsp563xx_core_reg;
        struct dsp563xx_common *dsp563xx = target_to_dsp563xx(target);
 
        if ((num < 0) || (num >= DSP563XX_NUMCOREREGS))
                return ERROR_INVALID_ARGUMENTS;
 
        reg_value = buf_get_u32(dsp563xx->core_cache->reg_list[num].value, 0, 32);
-       dsp563xx_core_reg = dsp563xx->core_cache->reg_list[num].arch_info;
        dsp563xx->core_regs[num] = reg_value;
        dsp563xx->core_cache->reg_list[num].valid = 1;
        dsp563xx->core_cache->reg_list[num].dirty = 0;
@@ -582,7 +578,7 @@ static int dsp563xx_reg_pc_read(struct target *target)
 static int dsp563xx_reg_ssh_read(struct target *target)
 {
        int err;
-       uint32_t sp, sc, ep;
+       uint32_t sp;
        struct dsp563xx_core_reg *arch_info;
        struct dsp563xx_common *dsp563xx = target_to_dsp563xx(target);
 
@@ -598,14 +594,14 @@ static int dsp563xx_reg_ssh_read(struct target *target)
        /* get a valid stack count */
        if ((err = dsp563xx_read_register(target, DSP563XX_REG_IDX_SC, 0)) != ERROR_OK)
                return err;
-       sc = dsp563xx->core_regs[DSP563XX_REG_IDX_SC];
+
        if ((err = dsp563xx_write_register(target, DSP563XX_REG_IDX_SC, 0)) != ERROR_OK)
                return err;
 
        /* get a valid extended pointer */
        if ((err = dsp563xx_read_register(target, DSP563XX_REG_IDX_EP, 0)) != ERROR_OK)
                return err;
-       ep = dsp563xx->core_regs[DSP563XX_REG_IDX_EP];
+
        if ((err = dsp563xx_write_register(target, DSP563XX_REG_IDX_EP, 0)) != ERROR_OK)
                return err;
 
@@ -1060,7 +1056,6 @@ static int dsp563xx_halt(struct target *target)
 static int dsp563xx_resume(struct target *target, int current, uint32_t address, int handle_breakpoints, int debug_execution)
 {
        int err;
-       struct dsp563xx_core_reg *dsp563xx_core_reg;
        struct dsp563xx_common *dsp563xx = target_to_dsp563xx(target);
 
        /* check if pc was changed and resume want to execute the next address
@@ -1072,7 +1067,6 @@ static int dsp563xx_resume(struct target *target, int current, uint32_t address,
        if ( current && dsp563xx->core_cache->reg_list[DSP563XX_REG_IDX_PC].dirty )
        {
                dsp563xx_write_core_reg(target,DSP563XX_REG_IDX_PC);
-               dsp563xx_core_reg = dsp563xx->core_cache->reg_list[DSP563XX_REG_IDX_PC].arch_info;
                address = dsp563xx->core_regs[DSP563XX_REG_IDX_PC];
                current = 0;
        }
@@ -1112,7 +1106,6 @@ static int dsp563xx_step_ex(struct target *target, int current, uint32_t address
        int err;
        uint32_t once_status;
        uint32_t dr_in, cnt;
-       struct dsp563xx_core_reg *dsp563xx_core_reg;
        struct dsp563xx_common *dsp563xx = target_to_dsp563xx(target);
 
        if (target->state != TARGET_HALTED)
@@ -1130,7 +1123,6 @@ static int dsp563xx_step_ex(struct target *target, int current, uint32_t address
        if ( current && dsp563xx->core_cache->reg_list[DSP563XX_REG_IDX_PC].dirty )
        {
                dsp563xx_write_core_reg(target,DSP563XX_REG_IDX_PC);
-               dsp563xx_core_reg = dsp563xx->core_cache->reg_list[DSP563XX_REG_IDX_PC].arch_info;
                address = dsp563xx->core_regs[DSP563XX_REG_IDX_PC];
                current = 0;
        }
index b171dcf72f60c18217d3b61a716adc6742f6370c..a38028c8004b92dc879ba564beb80d7bd683920c 100644 (file)
@@ -497,13 +497,12 @@ static int embeddedice_set_reg_w_exec(struct reg *reg, uint8_t *buf)
 void embeddedice_write_reg(struct reg *reg, uint32_t value)
 {
        struct embeddedice_reg *ice_reg = reg->arch_info;
-       int retval;
 
        LOG_DEBUG("%i: 0x%8.8" PRIx32 "", ice_reg->addr, value);
 
-       retval = arm_jtag_scann(ice_reg->jtag_info, 0x2, TAP_IDLE);
+       arm_jtag_scann(ice_reg->jtag_info, 0x2, TAP_IDLE);
 
-       retval = arm_jtag_set_instr(ice_reg->jtag_info, ice_reg->jtag_info->intest_instr, NULL, TAP_IDLE);
+       arm_jtag_set_instr(ice_reg->jtag_info, ice_reg->jtag_info->intest_instr, NULL, TAP_IDLE);
 
        uint8_t reg_addr = ice_reg->addr & 0x1f;
        embeddedice_write_reg_inner(ice_reg->jtag_info->tap, reg_addr, value);
index 4782067bf58d5b23521798ce9407cfe534c35c69..65ea6e859193058e863d979f9bc9ddc3366d5590 100644 (file)
@@ -143,7 +143,6 @@ static int mips32_set_core_reg(struct reg *reg, uint8_t *buf)
 static int mips32_read_core_reg(struct target *target, int num)
 {
        uint32_t reg_value;
-       struct mips32_core_reg *mips_core_reg;
 
        /* get pointers to arch-specific information */
        struct mips32_common *mips32 = target_to_mips32(target);
@@ -151,7 +150,6 @@ static int mips32_read_core_reg(struct target *target, int num)
        if ((num < 0) || (num >= MIPS32NUMCOREREGS))
                return ERROR_INVALID_ARGUMENTS;
 
-       mips_core_reg = mips32->core_cache->reg_list[num].arch_info;
        reg_value = mips32->core_regs[num];
        buf_set_u32(mips32->core_cache->reg_list[num].value, 0, 32, reg_value);
        mips32->core_cache->reg_list[num].valid = 1;
@@ -163,7 +161,6 @@ static int mips32_read_core_reg(struct target *target, int num)
 static int mips32_write_core_reg(struct target *target, int num)
 {
        uint32_t reg_value;
-       struct mips32_core_reg *mips_core_reg;
 
        /* get pointers to arch-specific information */
        struct mips32_common *mips32 = target_to_mips32(target);
@@ -172,7 +169,6 @@ static int mips32_write_core_reg(struct target *target, int num)
                return ERROR_INVALID_ARGUMENTS;
 
        reg_value = buf_get_u32(mips32->core_cache->reg_list[num].value, 0, 32);
-       mips_core_reg = mips32->core_cache->reg_list[num].arch_info;
        mips32->core_regs[num] = reg_value;
        LOG_DEBUG("write core reg %i value 0x%" PRIx32 "", num , reg_value);
        mips32->core_cache->reg_list[num].valid = 1;
index 178f68e16370ab11b167debfbcac285616c56d27..af60d321638652aad0a52a573add2aceacbfb7d9 100644 (file)
@@ -473,11 +473,8 @@ static int mips32_pracc_read_mem16(struct mips_ejtag *ejtag_info, uint32_t addr,
 
        int retval = ERROR_OK;
        int blocksize;
-       int bytesread;
        uint32_t param_in[2];
 
-       bytesread = 0;
-
        //while (count > 0)
        {
                blocksize = count;
@@ -492,7 +489,6 @@ static int mips32_pracc_read_mem16(struct mips_ejtag *ejtag_info, uint32_t addr,
 
 //             count -= blocksize;
 //             addr += blocksize;
-//             bytesread += blocksize;
        }
 
        for (i = 0; i < count; i++)
@@ -550,11 +546,8 @@ static int mips32_pracc_read_mem8(struct mips_ejtag *ejtag_info, uint32_t addr,
 
        int retval = ERROR_OK;
        int blocksize;
-       int bytesread;
        uint32_t param_in[2];
 
-       bytesread = 0;
-
 //     while (count > 0)
        {
                blocksize = count;
@@ -569,7 +562,6 @@ static int mips32_pracc_read_mem8(struct mips_ejtag *ejtag_info, uint32_t addr,
 
 //             count -= blocksize;
 //             addr += blocksize;
-//             bytesread += blocksize;
        }
 
        for (i = 0; i < count; i++)
index aabfa5b8d63fd2ee62d0e4edd880d4605a468ac0..f4adc8d05aece861ef660b33c63c04c229aacfc7 100644 (file)
@@ -95,7 +95,6 @@ int gdb_write_smp_packet(struct connection *connection,
 {
        char *separator;
        int coreid = 0;
-    int retval = ERROR_OK;
 
        /* skip command character */
        if (target->smp)
@@ -110,7 +109,8 @@ int gdb_write_smp_packet(struct connection *connection,
        }
        else
        {
-               retval = gdb_put_packet(connection,"E01",3);
+               gdb_put_packet(connection,"E01",3);
        }
+
        return ERROR_OK;
 }