Browse Source

tests,examples: fix cppcheck warnings

Nathalie Furmento 8 years ago
parent
commit
a8cc467700

+ 1 - 0
examples/heat/dw_factolu_grain.c

@@ -379,5 +379,6 @@ void dw_factoLU_grain(float *matA, unsigned size, unsigned ld, unsigned nblocks,
 
 #ifdef CHECK_RESULTS
 	compare_A_LU(Asaved, matA, size, ld);
+	free(Asaved);
 #endif
 }

+ 7 - 6
examples/spmv/dw_block_spmv.c

@@ -63,7 +63,7 @@ void create_data(void)
 
 	/* declare the corresponding block CSR to the runtime */
 	starpu_bcsr_data_register(&sparse_matrix, STARPU_MAIN_RAM, bcsr_matrix->nnz_blocks, bcsr_matrix->nrows_blocks,
-	                (uintptr_t)bcsr_matrix->val, bcsr_matrix->colind, bcsr_matrix->rowptr, 
+	                (uintptr_t)bcsr_matrix->val, bcsr_matrix->colind, bcsr_matrix->rowptr,
 			0, bcsr_matrix->r, bcsr_matrix->c, sizeof(float));
 
 	size = c*r*starpu_bcsr_get_nnz(sparse_matrix);
@@ -125,7 +125,7 @@ unsigned get_bcsr_nchildren(STARPU_ATTRIBUTE_UNUSED struct starpu_data_filter *f
   return (unsigned)starpu_bcsr_get_nnz(handle);
 }
 
-struct starpu_data_interface_ops *get_bcsr_child_ops(STARPU_ATTRIBUTE_UNUSED struct starpu_data_filter *f, STARPU_ATTRIBUTE_UNUSED unsigned child) 
+struct starpu_data_interface_ops *get_bcsr_child_ops(STARPU_ATTRIBUTE_UNUSED struct starpu_data_filter *f, STARPU_ATTRIBUTE_UNUSED unsigned child)
 {
   return &starpu_interface_matrix_ops;
 }
@@ -145,7 +145,7 @@ void call_filters(void)
 	vector_in_f.nchildren  = size/c;
 	vector_in_f.get_nchildren  = NULL;
 	vector_in_f.get_child_ops  = NULL;
-	
+
 	vector_out_f.filter_func = starpu_vector_filter_block;
 	vector_out_f.nchildren  = size/r;
 	vector_out_f.get_nchildren  = NULL;
@@ -178,8 +178,8 @@ void launch_spmv_codelets(void)
 	int ret;
 
 	/* we call one codelet per block */
-	unsigned nblocks = starpu_bcsr_get_nnz(sparse_matrix); 
-	unsigned nrows = starpu_bcsr_get_nrow(sparse_matrix); 
+	unsigned nblocks = starpu_bcsr_get_nnz(sparse_matrix);
+	unsigned nrows = starpu_bcsr_get_nrow(sparse_matrix);
 
 	remainingtasks = NSPMV*nblocks;
 	totaltasks = remainingtasks;
@@ -235,7 +235,7 @@ void launch_spmv_codelets(void)
 				task->handles[1] = starpu_data_get_sub_data(vector_in, 1, i);
 				task->handles[2] = starpu_data_get_sub_data(vector_out, 1, j);
 
-				/* all tasks in the same row are dependant so that we don't wait too much for data 
+				/* all tasks in the same row are dependant so that we don't wait too much for data
 				 * we need to wait on the previous task if we are not the first task of a row */
 				if (index != rowptr[row & ~0x3])
 				{
@@ -272,6 +272,7 @@ void launch_spmv_codelets(void)
 	}
 
 	printf("end of task submission (there was %u chains for %u tasks : ratio %u tasks per chain) !\n", nchains, totaltasks, totaltasks/nchains);
+	free(is_entry_tab);
 }
 
 void init_problem(void)

+ 6 - 6
examples/spmv/matrix_market/mmio.c

@@ -103,12 +103,12 @@ int mm_is_valid(MM_typecode matcode)
 
 int mm_read_banner(FILE *f, MM_typecode *matcode)
 {
-	char line[MM_MAX_LINE_LENGTH];
-	char banner[MM_MAX_TOKEN_LENGTH];
-	char mtx[MM_MAX_TOKEN_LENGTH];
-	char crd[MM_MAX_TOKEN_LENGTH];
-	char data_type[MM_MAX_TOKEN_LENGTH];
-	char storage_scheme[MM_MAX_TOKEN_LENGTH];
+	char line[MM_MAX_LINE_LENGTH+1];
+	char banner[MM_MAX_TOKEN_LENGTH+1];
+	char mtx[MM_MAX_TOKEN_LENGTH+1];
+	char crd[MM_MAX_TOKEN_LENGTH+1];
+	char data_type[MM_MAX_TOKEN_LENGTH+1];
+	char storage_scheme[MM_MAX_TOKEN_LENGTH+1];
 	char *p;
 
 	mm_clear_typecode(matcode);

+ 6 - 7
examples/stencil/implicit-stencil-blocks.c

@@ -282,7 +282,7 @@ static void free_block_on_node(starpu_data_handle_t handleptr, unsigned nx, unsi
 
 void display_memory_consumption(int rank, double time)
 {
-	FPRINTF(stderr, "%lu B of memory were allocated on node %d in %f ms\n", allocated, rank, time/1000);
+	FPRINTF(stderr, "%lu B of memory were allocated on node %d in %f ms\n", (unsigned long)allocated, rank, time/1000);
 }
 
 void allocate_memory_on_node(int rank)
@@ -356,18 +356,17 @@ void allocate_memory_on_node(int rank)
 	{
 		struct block_description *block = get_block_description(bz);
 		int node = block->mpi_node;
-		unsigned size_bz = block_sizes_z[bz];
 
 		if (node == rank)
 		{
-            /* Set all the data to 0 */
-            create_task_memset(sizex, sizey, bz);
+			/* Set all the data to 0 */
+			create_task_memset(sizex, sizey, bz);
 
-            /* Initialize the first layer with some random data */
-            create_task_initlayer(sizex, sizey, bz);
+			/* Initialize the first layer with some random data */
+			create_task_initlayer(sizex, sizey, bz);
 		}
 	}
-    starpu_task_wait_for_all();
+	starpu_task_wait_for_all();
 }
 
 void free_memory_on_node(int rank)

+ 2 - 2
examples/stencil/implicit-stencil-kernels.c

@@ -568,8 +568,8 @@ static void dummy_func_top_cuda(void *descr[] STARPU_ATTRIBUTE_UNUSED, void *arg
 /* bottom save, CUDA version */
 static void dummy_func_bottom_cuda(void *descr[] STARPU_ATTRIBUTE_UNUSED, void *arg)
 {
-    unsigned z;
-    starpu_codelet_unpack_args(arg, &z);
+	unsigned z;
+	starpu_codelet_unpack_args(arg, &z);
 	struct block_description *block = get_block_description(z);
 
 	int workerid = starpu_worker_get_id_check();

+ 25 - 27
examples/stencil/implicit-stencil-tasks.c

@@ -100,29 +100,27 @@ void create_task_initlayer(unsigned sizex, unsigned sizey, unsigned z)
 static void create_task_save_local(unsigned iter, unsigned z, int dir, int local_rank)
 {
 	struct block_description *descr = get_block_description(z);
-	int node_z = get_block_mpi_node(z);
-	int node_z_and_d = get_block_mpi_node(z+dir);
-    struct starpu_codelet *codelet;
-    int ret;
+	struct starpu_codelet *codelet;
+	int ret;
+
+	codelet = (dir == -1)?&save_cl_bottom:&save_cl_top;
+	ret = starpu_insert_task(
+				 codelet,
+				 STARPU_VALUE,   &z,  sizeof(unsigned),
+				 STARPU_R,   descr->layers_handle[0],
+				 STARPU_R,   descr->layers_handle[1],
+				 STARPU_W,   descr->boundaries_handle[(1-dir)/2][0],
+				 STARPU_W,   descr->boundaries_handle[(1-dir)/2][1],
+				 STARPU_PRIORITY,    STARPU_MAX_PRIO,
+				 0);
 
-    codelet = (dir == -1)?&save_cl_bottom:&save_cl_top;
-    ret = starpu_insert_task(
-            codelet,
-            STARPU_VALUE,   &z,  sizeof(unsigned),
-            STARPU_R,   descr->layers_handle[0],
-            STARPU_R,   descr->layers_handle[1],
-            STARPU_W,   descr->boundaries_handle[(1-dir)/2][0],
-            STARPU_W,   descr->boundaries_handle[(1-dir)/2][1],
-            STARPU_PRIORITY,    STARPU_MAX_PRIO,
-                0);
-
-    if (ret)
-    {
-        FPRINTF(stderr, "Could not submit task save: %d\n", ret);
-        if (ret == -ENODEV)
-            exit(77);
-        STARPU_ABORT();
-    }
+	if (ret)
+	{
+		FPRINTF(stderr, "Could not submit task save: %d\n", ret);
+		if (ret == -ENODEV)
+			exit(77);
+		STARPU_ABORT();
+	}
 }
 
 /*
@@ -191,14 +189,14 @@ void create_tasks(int rank)
 	     {
 		     if (iter != niter)
 		     {
-                int node_z = get_block_mpi_node(bz);
-                int node_z_and_b = get_block_mpi_node(bz-1);
-                int node_z_and_t = get_block_mpi_node(bz+1);
+			     int node_z = get_block_mpi_node(bz);
+			     int node_z_and_b = get_block_mpi_node(bz-1);
+			     int node_z_and_t = get_block_mpi_node(bz+1);
 
-                  if ((node_z == rank) || ((node_z != node_z_and_b) && (node_z_and_b == rank)))
+			     if ((node_z == rank) || ((node_z != node_z_and_b) && (node_z_and_b == rank)))
 				     create_task_save_local(iter, bz, +1, rank);
 
-                  if ((node_z == rank) || ((node_z != node_z_and_t) && (node_z_and_t == rank)))
+			     if ((node_z == rank) || ((node_z != node_z_and_t) && (node_z_and_t == rank)))
 				     create_task_save_local(iter, bz, -1, rank);
 		     }
 	     }

+ 1 - 1
tests/datawizard/gpu_ptr_register.c

@@ -77,7 +77,7 @@ check_result(unsigned *t, size_t size)
 	{
 		if (t[i] != i*2)
 		{
-			FPRINTF(stderr,"t[%d] is %u instead of %u\n", i, t[i], 2*i);
+			FPRINTF(stderr,"t[%u] is %u instead of %u\n", i, t[i], 2*i);
 			return 1;
 		}
 	}

+ 2 - 2
tests/datawizard/mpi_like_async.c

@@ -181,7 +181,7 @@ static int test_send_handle_async(void *arg)
 	if (ret)
 	{
 #ifdef DEBUG_MESSAGES
-		FPRINTF(stderr, "Thread %d sends value %d to thread %d\n", thread_data->index, thread_data->val, neighbour_data->index);
+		FPRINTF(stderr, "Thread %u sends value %u to thread %u\n", thread_data->index, thread_data->val, neighbour_data->index);
 #endif
 		starpu_data_release(thread_data->handle);
 	}
@@ -395,7 +395,7 @@ int main(int argc, char **argv)
 	ret = EXIT_SUCCESS;
 	if (problem_data[nthreads - 1].val != (nthreads * niter))
 	{
-		FPRINTF(stderr, "Final value : %u should be %d\n", problem_data[nthreads - 1].val, (nthreads * niter));
+		FPRINTF(stderr, "Final value : %u should be %u\n", problem_data[nthreads - 1].val, (nthreads * niter));
 		ret = EXIT_FAILURE;
 	}
 	starpu_data_release(last_handle);

+ 0 - 1
tests/datawizard/opencl_codelet_unsigned_inc.c

@@ -31,7 +31,6 @@ void opencl_codelet_unsigned_inc(void *buffers[], void *args)
         cl_int err;
 	cl_kernel kernel;
 	cl_command_queue queue;
-	cl_event event;
 
 	cl_mem val = (cl_mem) STARPU_VARIABLE_GET_PTR(buffers[0]);
 

+ 2 - 2
tests/datawizard/reclaim.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2010-2012, 2015-2016  Université de Bordeaux
- * Copyright (C) 2012  CNRS
+ * Copyright (C) 2012, 2016  CNRS
  *
  * 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
@@ -58,7 +58,7 @@ void dummy_func(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args)
 static unsigned int i = 0;
 void f(void *arg)
 {
-	printf("%d\n", ++i);
+	printf("%u\n", ++i);
 }
 
 static struct starpu_codelet dummy_cl =

+ 0 - 1
tests/datawizard/scal.c

@@ -46,7 +46,6 @@ void scal_func_opencl(void *buffers[], void *_args)
         cl_int err;
 	cl_kernel kernel;
 	cl_command_queue queue;
-	cl_event event;
 
 	unsigned n = STARPU_VECTOR_GET_NX(buffers[0]);
 	cl_mem val = (cl_mem)STARPU_VECTOR_GET_DEV_HANDLE(buffers[0]);

+ 0 - 1
tests/datawizard/scratch_opencl.c

@@ -30,7 +30,6 @@ void opencl_f(void *buffers[], void *args)
         cl_int err;
 	cl_kernel kernel;
 	cl_command_queue queue;
-	cl_event event;
 
 	unsigned n = STARPU_VECTOR_GET_NX(buffers[0]);
 	unsigned elemsize = STARPU_VECTOR_GET_ELEMSIZE(buffers[0]);

+ 0 - 2
tests/datawizard/sync_and_notify_data_opencl.c

@@ -32,7 +32,6 @@ void opencl_codelet_incA(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args)
 	cl_mem val = (cl_mem)STARPU_VECTOR_GET_DEV_HANDLE(descr[0]);
 	cl_kernel kernel;
 	cl_command_queue queue;
-	cl_event event;
 	int id, devid, err;
 
 	id = starpu_worker_get_id_check();
@@ -60,7 +59,6 @@ void opencl_codelet_incC(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args)
 	cl_mem val = (cl_mem)STARPU_VECTOR_GET_DEV_HANDLE(descr[0]);
 	cl_kernel kernel;
 	cl_command_queue queue;
-	cl_event event;
 	int id, devid, err;
 
 	id = starpu_worker_get_id_check();

+ 6 - 6
tests/datawizard/test_arbiter.cpp

@@ -49,20 +49,20 @@ void callback(void * /*buffers*/[], void * /*cl_arg*/)
 {
 	unsigned val;
 	val = STARPU_ATOMIC_ADD(&nb, 1);
-	FPRINTF(stdout,"callback in (%d)\n", val); fflush(stdout);
+	FPRINTF(stdout,"callback in (%u)\n", val); fflush(stdout);
 	usleep(SLEEP_FAST);
 	val = STARPU_ATOMIC_ADD(&nb, -1);
-	FPRINTF(stdout,"callback out (%d)\n", val); fflush(stdout);
+	FPRINTF(stdout,"callback out (%u)\n", val); fflush(stdout);
 }
 
 void callback_slow(void * /*buffers*/[], void * /*cl_arg*/)
 {
 	unsigned val;
 	val = STARPU_ATOMIC_ADD(&nb_slow, 1);
-	FPRINTF(stdout,"callback_slow in (%d)\n", val); fflush(stdout);
+	FPRINTF(stdout,"callback_slow in (%u)\n", val); fflush(stdout);
 	usleep(SLEEP_SLOW);
 	val = STARPU_ATOMIC_ADD(&nb_slow, -1);
-	FPRINTF(stdout,"callback_slow out (%d)\n", val); fflush(stdout);
+	FPRINTF(stdout,"callback_slow out (%u)\n", val); fflush(stdout);
 }
 
 
@@ -78,7 +78,7 @@ int main(int /*argc*/, char** /*argv*/)
 	if (ret == -ENODEV) return STARPU_TEST_SKIPPED;
 	STARPU_ASSERT(ret == 0);
 
-	FPRINTF(stdout, "Max Thread %d\n", starpu_worker_get_count());
+	FPRINTF(stdout, "Max Thread %u\n", starpu_worker_get_count());
 
 	//////////////////////////////////////////////////////
 
@@ -165,7 +165,7 @@ int main(int /*argc*/, char** /*argv*/)
 	for(int idxHandle = 0 ; idxHandle < nbA ; ++idxHandle)
 	{
 		starpu_variable_data_register(&handleA[idxHandle], 0, (uintptr_t)&dataA[idxHandle], sizeof(dataA[idxHandle]));
-		starpu_data_assign_arbiter(handleA[idxHandle], idxHandle%2?arbiter:arbiter2);
+		starpu_data_assign_arbiter(handleA[idxHandle], (idxHandle%2)?arbiter:arbiter2);
 	}
 
 	//////////////////////////////////////////////////////

+ 3 - 3
tests/experiments/latency/cuda_latency.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2010, 2011, 2013  CNRS
+ * Copyright (C) 2010, 2011, 2013, 2016  CNRS
  *
  * 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
@@ -200,10 +200,10 @@ int main(int argc, char **argv)
 	STARPU_PTHREAD_MUTEX_UNLOCK(&mutex);
 
 	end = starpu_timing_now();
-	
+
 	double timing = end - start;
 
-	fprintf(stderr, "Took %.0f ms for %d iterations\n", timing/1000, niter);
+	fprintf(stderr, "Took %.0f ms for %u iterations\n", timing/1000, niter);
 	fprintf(stderr, "Latency: %.2f us\n", timing/(2*niter));
 
 	return EXIT_SUCCESS;

+ 1 - 2
tests/loader.c

@@ -214,7 +214,6 @@ int main(int argc, char *argv[])
 {
 	int   child_exit_status;
 	char *test_args;
-	int   status;
 	char *launcher;
 	char *launcher_args;
 	struct sigaction sa;
@@ -343,7 +342,7 @@ int main(int argc, char *argv[])
 	{
 		if (WIFEXITED(child_exit_status))
 		{
-			status = WEXITSTATUS(child_exit_status);
+			int status = WEXITSTATUS(child_exit_status);
 			if (status == EXIT_SUCCESS)
 			{
 				alarm(0);

+ 15 - 15
tests/main/combined_workers/bfs/bfs.cpp

@@ -52,16 +52,16 @@ void read_file(char *input_f, unsigned int *nb_nodes, unsigned int *nb_edges,
 	}
 
 	fscanf(fp, "%u", nb_nodes);
-	
+
 	// allocate host memory
 	*origin_graph_nodes = (Node *) malloc(sizeof(Node) * (*nb_nodes));
 	*origin_graph_mask = (bool *) malloc(sizeof(bool) * (*nb_nodes));
 	*origin_updating_graph_mask = (bool *) malloc(sizeof(bool) * (*nb_nodes));
 	*origin_graph_visited = (bool *) malloc(sizeof(bool) * (*nb_nodes));
 
-	int start, edgeno;   
+	int start, edgeno;
 	// initalize the memory
-	for( unsigned int i = 0; i < *nb_nodes; i++) 
+	for( unsigned int i = 0; i < *nb_nodes; i++)
 	{
 		fscanf(fp,"%d %d",&start,&edgeno);
 		(*origin_graph_nodes)[i].starting = start;
@@ -89,7 +89,7 @@ void read_file(char *input_f, unsigned int *nb_nodes, unsigned int *nb_edges,
 		fscanf(fp,"%d",&cost);
 		(*origin_graph_edges)[i] = id;
 	}
-    
+
 
 	// allocate mem for the result on host side
 	*origin_cost = (int*) malloc( sizeof(int)* (*nb_nodes));
@@ -105,7 +105,7 @@ void read_file(char *input_f, unsigned int *nb_nodes, unsigned int *nb_edges,
 ////////////////////////////////////////////////////////////////////////////////
 // Main Program
 ////////////////////////////////////////////////////////////////////////////////
-int main( int argc, char** argv) 
+int main( int argc, char** argv)
 {
 	int ret;
 	char *input_f;
@@ -150,25 +150,25 @@ int main( int argc, char** argv)
 		Usage(argc, argv);
 		exit(1);
 	}
-    
+
 	input_f = argv[1];
 	read_file(input_f, &nb_nodes, &nb_edges, &origin_graph_nodes,
 		  &origin_graph_mask, &origin_updating_graph_mask,
 		  &origin_graph_visited, &origin_graph_edges, &origin_cost);
 
-	graph_nodes = (Node *) malloc(sizeof(Node)*nb_nodes);
-	graph_mask = (bool *) malloc(sizeof(bool)*nb_nodes);
-	updating_graph_mask = (bool *) malloc(sizeof(bool)*nb_nodes);
-	graph_visited = (bool *) malloc(sizeof(bool)*nb_nodes);
-	graph_edges = (int*) malloc(sizeof(int)*nb_edges);
-	cost = (int*) malloc( sizeof(int)*nb_nodes);
+	graph_nodes = (Node *) calloc(nb_nodes, sizeof(Node));
+	graph_mask = (bool *) calloc(nb_nodes, sizeof(bool));
+	updating_graph_mask = (bool *) calloc(nb_nodes, sizeof(bool));
+	graph_visited = (bool *) calloc(nb_nodes, sizeof(bool));
+	graph_edges = (int*) calloc(nb_edges, sizeof(int));
+	cost = (int*) calloc(nb_nodes, sizeof(int));
 
 	memcpy(graph_nodes, origin_graph_nodes, nb_nodes*sizeof(Node));
 	memcpy(graph_edges, origin_graph_edges, nb_edges*sizeof(int));
 
 	ret = starpu_init(NULL);
 	STARPU_CHECK_RETURN_VALUE(ret, "starpu_init");
-	
+
 	starpu_vector_data_register(&graph_nodes_handle, STARPU_MAIN_RAM,
 				    (uintptr_t) graph_nodes, nb_nodes,
 				    sizeof(graph_nodes[0] ));
@@ -187,7 +187,7 @@ int main( int argc, char** argv)
 				    sizeof(graph_visited[0]));
 	starpu_vector_data_register(&cost_handle, STARPU_MAIN_RAM, (uintptr_t)cost,
 				    nb_nodes, sizeof(cost[0]));
-	
+
 	for(int it=0; it < NB_ITERATION; it++)
 	{
 		starpu_data_acquire(graph_mask_handle, STARPU_W);
@@ -243,7 +243,7 @@ int main( int argc, char** argv)
 	//Store the result into a file
 	FILE *fpo = fopen("result.txt","w");
 	for(unsigned int i=0;i<nb_nodes;i++)
-		fprintf(fpo,"%d) cost:%d\n", i, cost[i]);
+		fprintf(fpo,"%u) cost:%d\n", i, cost[i]);
 	fclose(fpo);
 	printf("Result stored in result.txt\n");
 

+ 2 - 2
tests/main/pack.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2014  CNRS
+ * Copyright (C) 2014, 2016  CNRS
  *
  * 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
@@ -43,7 +43,7 @@ struct starpu_codelet mycodelet =
 
 int main(int argc, char **argv)
 {
-        int i, ret;
+        int ret;
         int x=42;
 	int factor=12;
 	char c='n';

+ 4 - 4
tests/main/tag_task_data_deps.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2010-2013, 2016  Université de Bordeaux
- * Copyright (C) 2010, 2011, 2012, 2013, 2015  CNRS
+ * Copyright (C) 2010, 2011, 2012, 2013, 2015, 2016  CNRS
  *
  * 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
@@ -105,9 +105,9 @@ int main(int argc, char **argv)
 	do
 	{
 #endif
-		int durationA = loop & 1 ? duration:0;
-		int durationB = loop & 2 ? duration:0;
-		int durationC = loop & 4 ? duration:0;
+		int durationA = (loop & 1) ? duration:0;
+		int durationB = (loop & 2) ? duration:0;
+		int durationC = (loop & 4) ? duration:0;
 		int writeA, dataA;
 		int writeB, dataB;
 		int writeC, dataC;

+ 2 - 2
tests/microbenchs/parallel_dependent_homogeneous_tasks_data.c

@@ -135,8 +135,8 @@ int main(int argc, char *argv[])
 	FPRINTF(stderr, "measured time = %f seconds\n", time_m);
 	FPRINTF(stderr, "sequential time = %f seconds\n", time_s);
 	FPRINTF(stderr, "speed up = %f\n", speed_up);
-	FPRINTF(stderr, "number of workers = %d\n", nb_workers);
-	FPRINTF(stderr, "number of tasks = %d\n", nb_tasks);
+	FPRINTF(stderr, "number of workers = %u\n", nb_workers);
+	FPRINTF(stderr, "number of tasks = %u\n", nb_tasks);
 	FPRINTF(stderr, "expected speed up = %f\n", expected_speed_up);
 	FPRINTF(stderr, "percentage of expected speed up %.2f%%\n", percentage_expected_speed_up);
 

+ 1 - 1
tests/microbenchs/parallel_independent_heterogeneous_tasks.c

@@ -124,7 +124,7 @@ int main(int argc, char *argv[])
 	check = speed_up >= (1 - MARGIN) * expected_speed_up;
 	check_sup = speed_up <= (1 + MARGIN) * expected_speed_up;
 
-	printf("measured time = %f seconds\nsequential time = %f seconds\nspeed up = %f\nnumber of workers CPU = %d\nnumber of workers CUDA = %d\nnumber of workers OPENCL = %d\nnumber of tasks = %d\nexpected speed up = %f\npercentage of expected speed up = %.2f%%\n", time_m, time_s, speed_up, nb_workers_CPU, nb_workers_CUDA, nb_workers_OPENCL, nb_tasks, expected_speed_up, percentage_expected_speed_up);
+	printf("measured time = %f seconds\nsequential time = %f seconds\nspeed up = %f\nnumber of workers CPU = %u\nnumber of workers CUDA = %u\nnumber of workers OPENCL = %u\nnumber of tasks = %u\nexpected speed up = %f\npercentage of expected speed up = %.2f%%\n", time_m, time_s, speed_up, nb_workers_CPU, nb_workers_CUDA, nb_workers_OPENCL, nb_tasks, expected_speed_up, percentage_expected_speed_up);
 
 	starpu_shutdown();
 

+ 1 - 1
tests/microbenchs/parallel_independent_heterogeneous_tasks_data.c

@@ -161,7 +161,7 @@ int main(int argc, char *argv[])
 	check = speed_up >= ((1 - MARGIN) * expected_speed_up);
 	check_sup = speed_up <= ((1 + MARGIN) * expected_speed_up);
 
-	printf("measured time = %f seconds\nsequential time = %f seconds\nspeed up = %f\nnumber of workers CPU = %d\nnumber of workers CUDA = %d\nnumber of workers OPENCL = %d\nnumber of tasks = %d\nexpected speed up = %f\npercentage of expected speed up %.2f%%\n", time_m, time_s, speed_up, nb_workers_CPU, nb_workers_CUDA, nb_workers_OPENCL, nb_tasks, expected_speed_up, percentage_expected_speed_up);
+	printf("measured time = %f seconds\nsequential time = %f seconds\nspeed up = %f\nnumber of workers CPU = %u\nnumber of workers CUDA = %u\nnumber of workers OPENCL = %u\nnumber of tasks = %u\nexpected speed up = %f\npercentage of expected speed up %.2f%%\n", time_m, time_s, speed_up, nb_workers_CPU, nb_workers_CUDA, nb_workers_OPENCL, nb_tasks, expected_speed_up, percentage_expected_speed_up);
 
 	starpu_shutdown();
 	for (j = 0; j < nb_tasks; j++)

+ 1 - 1
tests/microbenchs/parallel_independent_homogeneous_tasks.c

@@ -95,7 +95,7 @@ int main(int argc, char *argv[])
 	check = speed_up >= ((1 - MARGIN) * expected_speed_up);
 	check_sup = speed_up <= ((1 + MARGIN) * expected_speed_up);
 
-	printf("measured time = %f seconds\nsequential time = %f seconds\nspeed up = %f\nnumber of workers = %d\nnumber of tasks = %d\nexpected speed up = %f\npercentage of expected speed up = %.2f%%\n", time_m, time_s, speed_up, nb_workers, nb_tasks, expected_speed_up, percentage_expected_speed_up);
+	printf("measured time = %f seconds\nsequential time = %f seconds\nspeed up = %f\nnumber of workers = %u\nnumber of tasks = %u\nexpected speed up = %f\npercentage of expected speed up = %.2f%%\n", time_m, time_s, speed_up, nb_workers, nb_tasks, expected_speed_up, percentage_expected_speed_up);
 
 	starpu_shutdown();
 

+ 1 - 1
tests/microbenchs/parallel_independent_homogeneous_tasks_data.c

@@ -132,7 +132,7 @@ int main(int argc, char *argv[])
 	check = speed_up >= ((1 - MARGIN) * expected_speed_up);
 	check_sup = speed_up <= ((1 + MARGIN) * expected_speed_up);
 
-	printf("measured time = %f seconds\nsequential time = %f seconds\nspeed up = %f\nnumber of workers = %d\nnumber of tasks = %d\nexpected speed up = %f\npercentage of expected speed up %.2f%%\n", time_m, time_s, speed_up, nb_workers, nb_tasks, expected_speed_up, percentage_expected_speed_up);
+	printf("measured time = %f seconds\nsequential time = %f seconds\nspeed up = %f\nnumber of workers = %u\nnumber of tasks = %u\nexpected speed up = %f\npercentage of expected speed up %.2f%%\n", time_m, time_s, speed_up, nb_workers, nb_tasks, expected_speed_up, percentage_expected_speed_up);
 
 	starpu_shutdown();
 	for (j = 0; j < nb_tasks; j++)

+ 2 - 3
tests/microbenchs/tasks_size_overhead.c

@@ -56,13 +56,12 @@ struct starpu_task *tasks;
 
 void func(void *descr[] STARPU_ATTRIBUTE_UNUSED, void *arg)
 {
-	double tv1, tv2;
 	unsigned n = (uintptr_t)arg;
 	long usec = 0;
-	tv1 = starpu_timing_now();
+	double tv1 = starpu_timing_now();
 	do
 	{
-		tv2 = starpu_timing_now();
+		double tv2 = starpu_timing_now();
 		usec = tv2 - tv1;
 	}
 	while (usec < n);

+ 0 - 1
tests/perfmodels/opencl_memset.c

@@ -30,7 +30,6 @@ void memset_opencl(void *buffers[], void *args)
         cl_int err;
 	cl_kernel kernel;
 	cl_command_queue queue;
-	cl_event event;
 
 	unsigned n = STARPU_VECTOR_GET_NX(buffers[0]);
 	cl_mem val = (cl_mem)STARPU_VECTOR_GET_DEV_HANDLE(buffers[0]);

+ 1 - 1
tests/perfmodels/regression_based.c

@@ -138,7 +138,7 @@ static void show_task_perfs(int size, struct starpu_task *task)
 		unsigned nimpl;
 		for (nimpl = 0; nimpl < STARPU_MAXIMPLEMENTATIONS; nimpl++)
 		{
-			FPRINTF(stdout, "Expected time for %d on %s (impl %d):\t%f\n",
+			FPRINTF(stdout, "Expected time for %d on %s (impl %u):\t%f\n",
 				size, name, nimpl, starpu_task_expected_length(task, starpu_worker_get_perf_archtype(workerid, task->sched_ctx), nimpl));
 		}
 	}