Parcourir la source

gcc 4.6 warning fixes

Samuel Thibault il y a 15 ans
Parent
commit
15095f084b

+ 3 - 2
src/core/dependencies/data_concurrency.c

@@ -47,8 +47,9 @@ static unsigned may_unlock_data_req_list_head(starpu_data_handle handle)
 	/* if there is no reference to the data anymore, we can use it */
 	if (handle->refcnt == 0)
 	{
-		STARPU_ASSERT(!handle->per_node[0].request);
-		STARPU_ASSERT(!handle->per_node[1].request);
+		int i;
+		for (i = 0; i < STARPU_MAXNODES; i++)
+			STARPU_ASSERT(!handle->per_node[i].request);
 		return 1;
 	}
 

+ 0 - 3
src/core/policies/random_policy.c

@@ -32,7 +32,6 @@ static starpu_job_t random_pop_task(struct starpu_jobq_s *q)
 static int _random_push_task(struct starpu_jobq_s *q __attribute__ ((unused)), starpu_job_t task, unsigned prio)
 {
 	/* find the queue */
-	struct starpu_fifo_jobq_s *fifo;
 	unsigned worker;
 
 	unsigned selected = 0;
@@ -60,8 +59,6 @@ static int _random_push_task(struct starpu_jobq_s *q __attribute__ ((unused)), s
 	}
 
 	/* we should now have the best worker in variable "best" */
-	fifo = queue_array[selected]->queue;
-
 	if (prio) {
 		return _starpu_fifo_push_prio_task(queue_array[selected], task);
 	} else {

+ 1 - 1
src/core/workers.c

@@ -328,7 +328,7 @@ int starpu_init(struct starpu_conf *user_conf)
 
 static void _starpu_terminate_workers(struct starpu_machine_config_s *config)
 {
-	int status;
+	int status __attribute__((unused));
 	unsigned workerid;
 
 	for (workerid = 0; workerid < config->nworkers; workerid++)

+ 1 - 1
src/datawizard/user_interactions.c

@@ -86,7 +86,7 @@ static void _starpu_sync_data_with_mem_continuation_non_blocking(void *arg)
 	STARPU_ASSERT(!ret);
 }
 
-void starpu_data_sync_with_mem_non_blocking_pre_sync_callback(void *arg)
+static void starpu_data_sync_with_mem_non_blocking_pre_sync_callback(void *arg)
 {
 	struct state_and_node *statenode = arg;