Skip to content

Commit 908ee4d

Browse files
committed
build: remove clang unused variable assignment warnings
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>
1 parent 8573592 commit 908ee4d

4 files changed

Lines changed: 7 additions & 9 deletions

File tree

src/flash/nor/at91sam4.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -849,9 +849,9 @@ static int FLASHD_GetLockBits(struct sam4_bank_private *pPrivate, uint32_t *v)
849849
LOG_DEBUG("Here");
850850
r = EFC_PerformCommand(pPrivate, AT91C_EFC_FCMD_GLB, 0, NULL);
851851
if (r == ERROR_OK) {
852-
r = EFC_GetResult(pPrivate, v);
853-
r = EFC_GetResult(pPrivate, v);
854-
r = EFC_GetResult(pPrivate, v);
852+
EFC_GetResult(pPrivate, v);
853+
EFC_GetResult(pPrivate, v);
854+
EFC_GetResult(pPrivate, v);
855855
r = EFC_GetResult(pPrivate, v);
856856
}
857857
LOG_DEBUG("End: %d", r);

src/flash/nor/fm3.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,6 @@ static int fm3_probe(struct flash_bank *bank)
579579

580580
bank->sectors = malloc(sizeof(struct flash_sector) * num_pages);
581581
bank->base = 0x00000000;
582-
num_pages = 2; /* start with smallest Flash pages number */
583582
bank->size = 32 * 1024; /* bytes */
584583

585584
bank->sectors[0].offset = 0;

src/rtos/linux.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ static int linux_os_thread_reg_list(struct rtos *rtos,
302302
hex_string += sprintf(hex_string, "%02x", 0);
303303

304304
uint32_t cpsr = 0x00000000;
305-
hex_string = reg_converter(hex_string, &cpsr, 4);
305+
reg_converter(hex_string, &cpsr, 4);
306306
}
307307
}
308308
return ERROR_OK;
@@ -769,12 +769,12 @@ int linux_get_tasks(struct target *target, int context)
769769
struct threads *last = NULL;
770770
t->base_addr = linux_os->init_task_addr;
771771
/* retrieve the thread id , currently running in the different smp core */
772-
retval = get_current(target, 1);
772+
get_current(target, 1);
773773

774774
while (((t->base_addr != linux_os->init_task_addr) &&
775775
(t->base_addr != 0)) || (loop == 0)) {
776776
loop++;
777-
retval = fill_task(target, t);
777+
fill_task(target, t);
778778
retval = get_name(target, t);
779779

780780
if (loop > MAX_THREADS) {
@@ -1214,7 +1214,7 @@ int linux_thread_extra_info(struct target *target,
12141214
tmp_str_ptr +=
12151215
sprintf(tmp_str_ptr, "%d", (int)temp->pid);
12161216
tmp_str_ptr += sprintf(tmp_str_ptr, "%s", " | ");
1217-
tmp_str_ptr += sprintf(tmp_str_ptr, "%s", name);
1217+
sprintf(tmp_str_ptr, "%s", name);
12181218
sprintf(tmp_str_ptr, "%s", temp->name);
12191219
char *hex_str =
12201220
(char *)calloc(1, strlen(tmp_str) * 2 + 1);

src/target/target.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5058,7 +5058,6 @@ static int jim_target_smp(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
50585058
struct target_list *head, *curr, *new;
50595059
curr = (struct target_list *) NULL;
50605060
head = (struct target_list *) NULL;
5061-
new = (struct target_list *) NULL;
50625061

50635062
retval = 0;
50645063
LOG_DEBUG("%d", argc);

0 commit comments

Comments
 (0)