瀏覽代碼

fixes following GCC (annoying) warnings

Nathalie Furmento 13 年之前
父節點
當前提交
7d34fe53b5

+ 3 - 3
examples/heat/heat.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2009, 2010  Université de Bordeaux 1
- * Copyright (C) 2010, 2011  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -351,8 +351,8 @@ static void solve_system(unsigned size, unsigned subsize, float *result, int *Re
         /* solve UX = X' */
 	FPRINTF(stderr, "Solving the problem ...\n");
 
-	float *savedB;
-	float *LUB;
+	float *savedB = NULL;
+	float *LUB = NULL;
 
 	if (check)
 	{

+ 1 - 1
examples/lu/lu_example.c

@@ -300,7 +300,7 @@ int main(int argc, char **argv)
 
 	init_matrix();
 
-	unsigned *ipiv;
+	unsigned *ipiv = NULL;
 	if (check)
 		save_matrix();
 

+ 1 - 1
mpi/examples/scatter_gather/mpi_scatter_gather.c

@@ -57,7 +57,7 @@ static struct starpu_codelet cl =
 int main(int argc, char **argv)
 {
         int rank, nodes;
-	float ***bmat;
+	float ***bmat = NULL;
         starpu_data_handle_t *data_handles;
 
 	unsigned i,j,x,y;

+ 2 - 2
src/datawizard/filters.c

@@ -250,6 +250,8 @@ void starpu_data_partition(starpu_data_handle_t initial_handle, struct starpu_da
 
 void _starpu_empty_codelet_function(void *buffers[], void *args)
 {
+	(void) buffers; // unused;
+	(void) args; // unused;
 }
 
 void starpu_data_unpartition(starpu_data_handle_t root_handle, uint32_t gathering_node)
@@ -279,8 +281,6 @@ void starpu_data_unpartition(starpu_data_handle_t root_handle, uint32_t gatherin
 				.modes = { STARPU_RW },
 				.nbuffers = 1
 			};
-			struct starpu_multiformat_interface *format_interface;
-			format_interface = starpu_data_get_interface_on_node(child_handle, 0);
 			struct starpu_task *task = starpu_task_create();
 			task->handles[0] = child_handle;
 			task->cl = &cl;

+ 2 - 2
src/sched_policies/heft.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2010, 2011-2012  Université de Bordeaux 1
- * Copyright (C) 2010, 2011  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012  Centre National de la Recherche Scientifique
  * Copyright (C) 2011  Télécom-SudParis
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -230,7 +230,7 @@ static void compute_all_performance_predictions(struct starpu_task *task,
 					double local_data_penalty[STARPU_NMAXWORKERS][STARPU_MAXIMPLEMENTATIONS],
 					double local_power[STARPU_NMAXWORKERS][STARPU_MAXIMPLEMENTATIONS],
 					int *forced_worker, int *forced_impl,
-					struct _starpu_task_bundle *bundle)
+					starpu_task_bundle_t bundle)
 {
 	int calibrating = 0;
 	double max_exp_end = DBL_MIN;

+ 1 - 1
tests/core/subgraph_repeat.c

@@ -47,7 +47,7 @@ static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
 
 static void dummy_func(void *descr[] __attribute__ ((unused)), void *arg __attribute__ ((unused)))
 {
-	STARPU_ATOMIC_ADD(&check_cnt, 1);
+	(void) STARPU_ATOMIC_ADD(&check_cnt, 1);
 }
 
 static struct starpu_codelet dummy_codelet =

+ 1 - 1
tests/core/subgraph_repeat_regenerate.c

@@ -47,7 +47,7 @@ static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
 
 static void dummy_func(void *descr[] __attribute__ ((unused)), void *arg __attribute__ ((unused)))
 {
-	STARPU_ATOMIC_ADD(&check_cnt, 1);
+	(void) STARPU_ATOMIC_ADD(&check_cnt, 1);
 }
 
 static struct starpu_codelet dummy_codelet =

+ 1 - 1
tests/datawizard/interfaces/test_interfaces.c

@@ -298,7 +298,7 @@ create_task(struct starpu_task **taskp, enum starpu_archtype type, int id)
 							STARPU_MAXOPENCLDEVS);
 	}
 
-	int workerid;
+	int workerid=0;
 	static struct starpu_codelet cl;
 	cl.nbuffers = 1;
 	cl.modes[0] = STARPU_RW;