浏览代码

fix bugs detected by scan clang tool

Nathalie Furmento 8 年之前
父节点
当前提交
2999f665f2
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      src/core/sched_ctx_list.c
  2. 1 1
      tests/sched_ctx/sched_ctx_list.c

+ 1 - 1
src/core/sched_ctx_list.c

@@ -179,7 +179,7 @@ struct _starpu_sched_ctx_elt* _starpu_sched_ctx_list_add_prio(struct _starpu_sch
 							      unsigned prio, unsigned sched_ctx)
 {
 	struct _starpu_sched_ctx_list *parent_list = NULL, *prev = NULL, *last = NULL;
-	struct _starpu_sched_ctx_list *l = *list;
+	struct _starpu_sched_ctx_list *l;
 
 	for (l = *list; l != NULL; l=l->next)
 	{

+ 1 - 1
tests/sched_ctx/sched_ctx_list.c

@@ -105,7 +105,7 @@ int main(int argc, char **argv)
 
 	/* Add element before head */
 	ret = 1;
-	elt = _starpu_sched_ctx_elt_add_before(ctx_list->next, 4);
+	_starpu_sched_ctx_elt_add_before(ctx_list->next, 4);
 	ret &= (ctx_list->next->head->prev->sched_ctx == 4);
 	ret &= (ctx_list->next->head->next->next->sched_ctx == 4);
 	global &= ret;