build: remove clang unused variable assignment warnings
authorSpencer Oliver <spen@spen-soft.co.uk>
Fri, 27 Apr 2012 13:28:51 +0000 (14:28 +0100)
committerSpencer Oliver <spen@spen-soft.co.uk>
Fri, 4 May 2012 08:15:40 +0000 (08:15 +0000)
Change-Id: Ibe5254704d6cd879a318a82c4f50d9da3c14276c
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/600
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
src/flash/nor/at91sam4.c
src/flash/nor/fm3.c
src/rtos/linux.c
src/target/target.c

index 00a54fe1fb2be05184f2ab72233d05d48827a872..c009a13998bae1c4d3f27fd49b09820ee7f728bf 100644 (file)
@@ -849,9 +849,9 @@ static int FLASHD_GetLockBits(struct sam4_bank_private *pPrivate, uint32_t *v)
        LOG_DEBUG("Here");
        r = EFC_PerformCommand(pPrivate, AT91C_EFC_FCMD_GLB, 0, NULL);
        if (r == ERROR_OK)      {
-               r = EFC_GetResult(pPrivate, v);
-               r = EFC_GetResult(pPrivate, v);
-               r = EFC_GetResult(pPrivate, v);
+               EFC_GetResult(pPrivate, v);
+               EFC_GetResult(pPrivate, v);
+               EFC_GetResult(pPrivate, v);
                r = EFC_GetResult(pPrivate, v);
        }
        LOG_DEBUG("End: %d", r);
index 22772aaa02b038ec5174dd0e36e917af15c0573d..583ba22c4ec1fb7db80710e48cbc50ebd6eccfd1 100644 (file)
@@ -579,7 +579,6 @@ static int fm3_probe(struct flash_bank *bank)
 
        bank->sectors = malloc(sizeof(struct flash_sector) * num_pages);
        bank->base = 0x00000000;
-       num_pages = 2;                          /* start with smallest Flash pages number */
        bank->size = 32 * 1024;         /* bytes */
 
        bank->sectors[0].offset = 0;
index 198f66e03c42a9b435a41dfbaec7dd74aa67c0d1..cd7ae0437072fde15d4e5920caa4ddb7f6e4d825 100644 (file)
@@ -302,7 +302,7 @@ static int linux_os_thread_reg_list(struct rtos *rtos,
                                hex_string += sprintf(hex_string, "%02x", 0);
 
                        uint32_t cpsr = 0x00000000;
-                       hex_string = reg_converter(hex_string, &cpsr, 4);
+                       reg_converter(hex_string, &cpsr, 4);
                }
        }
        return ERROR_OK;
@@ -769,12 +769,12 @@ int linux_get_tasks(struct target *target, int context)
        struct threads *last = NULL;
        t->base_addr = linux_os->init_task_addr;
        /* retrieve the thread id , currently running in the different smp core */
-       retval = get_current(target, 1);
+       get_current(target, 1);
 
        while (((t->base_addr != linux_os->init_task_addr) &&
                (t->base_addr != 0)) || (loop == 0)) {
                loop++;
-               retval = fill_task(target, t);
+               fill_task(target, t);
                retval = get_name(target, t);
 
                if (loop > MAX_THREADS) {
@@ -1214,7 +1214,7 @@ int linux_thread_extra_info(struct target *target,
                        tmp_str_ptr +=
                                sprintf(tmp_str_ptr, "%d", (int)temp->pid);
                        tmp_str_ptr += sprintf(tmp_str_ptr, "%s", " | ");
-                       tmp_str_ptr += sprintf(tmp_str_ptr, "%s", name);
+                       sprintf(tmp_str_ptr, "%s", name);
                        sprintf(tmp_str_ptr, "%s", temp->name);
                        char *hex_str =
                                (char *)calloc(1, strlen(tmp_str) * 2 + 1);
index 51518e683390d0bcaf86bd0846a9c349c2331748..1778a5aa3d31c30e5b18a945cc2f3c02d5413459 100644 (file)
@@ -5058,7 +5058,6 @@ static int jim_target_smp(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
        struct target_list *head, *curr, *new;
        curr = (struct target_list *) NULL;
        head = (struct target_list *) NULL;
-       new = (struct target_list *) NULL;
 
        retval = 0;
        LOG_DEBUG("%d", argc);