Pārlūkot izejas kodu

cast void* to please the SCC compiler

Samuel Thibault 13 gadi atpakaļ
vecāks
revīzija
bd2c88d145
83 mainītis faili ar 350 papildinājumiem un 339 dzēšanām
  1. 1 0
      configure.ac
  2. 1 1
      examples/basic_examples/hello_world.c
  3. 3 3
      examples/basic_examples/mult.c
  4. 2 2
      examples/basic_examples/vector_scal_cpu.c
  5. 1 1
      examples/filters/fblock_cpu.c
  6. 1 1
      examples/filters/fmatrix.c
  7. 1 1
      examples/filters/fvector.c
  8. 1 1
      examples/mandelbrot/mandelbrot.c
  9. 6 6
      examples/ppm_downscaler/ppm_downscaler.c
  10. 8 8
      examples/ppm_downscaler/yuv_downscaler.c
  11. 1 1
      examples/profiling/profiling.c
  12. 4 4
      examples/reductions/dot_product.c
  13. 2 2
      examples/reductions/minmax_reduction.c
  14. 2 2
      examples/spmv/spmv.c
  15. 2 2
      examples/stencil/stencil-blocks.c
  16. 31 23
      examples/stencil/stencil-kernels.c
  17. 3 3
      examples/stencil/stencil.c
  18. 1 1
      examples/tag_example/tag_restartable.c
  19. 3 3
      examples/top/hello_world_top.c
  20. 2 2
      src/common/htable32.c
  21. 1 1
      src/core/combined_workers.c
  22. 2 2
      src/core/dependencies/cg.c
  23. 2 2
      src/core/dependencies/htable.c
  24. 4 4
      src/core/dependencies/implicit_data_deps.c
  25. 5 5
      src/core/dependencies/tags.c
  26. 1 1
      src/core/dependencies/task_deps.c
  27. 1 1
      src/core/parallel_task.c
  28. 8 8
      src/core/perfmodel/perfmodel_history.c
  29. 2 2
      src/core/perfmodel/regression.c
  30. 2 2
      src/core/task.c
  31. 3 3
      src/core/task_bundle.c
  32. 5 5
      src/core/workers.c
  33. 1 1
      src/datawizard/coherency.c
  34. 1 1
      src/datawizard/data_request.c
  35. 5 5
      src/datawizard/datastats.c
  36. 1 1
      src/datawizard/filters.c
  37. 1 1
      src/datawizard/footprint.c
  38. 2 2
      src/datawizard/interfaces/bcsr_filters.c
  39. 19 19
      src/datawizard/interfaces/bcsr_interface.c
  40. 2 2
      src/datawizard/interfaces/block_filters.c
  41. 18 18
      src/datawizard/interfaces/block_interface.c
  42. 2 2
      src/datawizard/interfaces/csr_filters.c
  43. 17 17
      src/datawizard/interfaces/csr_interface.c
  44. 3 3
      src/datawizard/interfaces/data_interface.c
  45. 4 4
      src/datawizard/interfaces/matrix_filters.c
  46. 16 16
      src/datawizard/interfaces/matrix_interface.c
  47. 8 8
      src/datawizard/interfaces/variable_interface.c
  48. 7 7
      src/datawizard/interfaces/vector_filters.c
  49. 14 14
      src/datawizard/interfaces/vector_interface.c
  50. 3 3
      src/datawizard/memory_nodes.c
  51. 2 2
      src/datawizard/sort_data_handles.c
  52. 6 6
      src/datawizard/user_interactions.c
  53. 1 1
      src/drivers/cpu/driver_cpu.c
  54. 5 5
      src/profiling/bound.c
  55. 1 1
      src/profiling/profiling.c
  56. 1 1
      src/sched_policies/deque_queues.c
  57. 1 1
      src/sched_policies/eager_central_priority_policy.c
  58. 1 1
      src/sched_policies/fifo_queues.c
  59. 1 1
      src/sched_policies/stack_queues.c
  60. 33 33
      src/top/starpu_top.c
  61. 2 2
      src/top/starputop_message_queue.c
  62. 3 3
      src/top/starputop_task.c
  63. 1 1
      src/util/execute_on_all.c
  64. 1 1
      src/util/starpu_data_cpy.c
  65. 1 1
      src/util/starpu_insert_task.c
  66. 9 7
      src/util/starpu_insert_task_utils.c
  67. 1 1
      tests/core/declare_deps_in_callback.c
  68. 1 1
      tests/core/empty_task_chain.c
  69. 2 2
      tests/core/get_current_task.c
  70. 1 1
      tests/core/wait_all_regenerable_tasks.c
  71. 4 4
      tests/datawizard/data_implicit_deps.c
  72. 3 3
      tests/datawizard/data_lookup.c
  73. 1 1
      tests/datawizard/handle_to_pointer.c
  74. 1 1
      tests/datawizard/mpi_like.c
  75. 7 7
      tests/datawizard/mpi_like_async.c
  76. 3 3
      tests/datawizard/reclaim.c
  77. 1 1
      tests/datawizard/scratch.c
  78. 1 1
      tests/datawizard/user_interaction_implicit.c
  79. 1 1
      tests/helper/execute_on_all.c
  80. 1 1
      tests/microbenchs/async_tasks_overhead.c
  81. 2 2
      tests/microbenchs/tasks_overhead.c
  82. 5 5
      tools/starpu_perfmodel_display.c
  83. 10 10
      tools/starpu_perfmodel_plot.c

+ 1 - 0
configure.ac

@@ -270,6 +270,7 @@ AC_DEFUN([STARPU_CHECK_CUDA],
 
     if test "$have_valid_cuda" = "no" ; then
         LDFLAGS="${SAVED_LDFLAGS}"
+	unset STARPU_CUDA_LDFLAGS
     fi
 ])
 

+ 1 - 1
examples/basic_examples/hello_world.c

@@ -52,7 +52,7 @@ struct params {
 };
 void cpu_func(void *buffers[], void *cl_arg)
 {
-	struct params *params = cl_arg;
+	struct params *params = (struct params *) cl_arg;
 
 	FPRINTF(stdout, "Hello world (params = {%i, %f} )\n", params->i, params->f);
 }

+ 3 - 3
examples/basic_examples/mult.c

@@ -127,9 +127,9 @@ static void init_problem_data(void)
 
 	/* we initialize matrices A, B and C in the usual way */
 
-	A = malloc(zdim*ydim*sizeof(float));
-	B = malloc(xdim*zdim*sizeof(float));
-	C = malloc(xdim*ydim*sizeof(float));
+	A = (float *) malloc(zdim*ydim*sizeof(float));
+	B = (float *) malloc(xdim*zdim*sizeof(float));
+	C = (float *) malloc(xdim*ydim*sizeof(float));
 
 	/* fill the A and B matrices */
 	srand(2009);

+ 2 - 2
examples/basic_examples/vector_scal_cpu.c

@@ -24,7 +24,7 @@
 void scal_cpu_func(void *buffers[], void *cl_arg)
 {
 	unsigned i;
-	float *factor = cl_arg;
+	float *factor = (float *) cl_arg;
 
 	/*
 	 * The "buffers" array matches the task->buffers array: for instance
@@ -37,7 +37,7 @@ void scal_cpu_func(void *buffers[], void *cl_arg)
 	 * migrated/replicated), and elemsize gives the size of each elements.
 	 */
 
-	starpu_vector_interface_t *vector = buffers[0];
+	starpu_vector_interface_t *vector = (starpu_vector_interface_t *) buffers[0];
 
 	/* length of the vector */
 	unsigned n = STARPU_VECTOR_GET_NX(vector);

+ 1 - 1
examples/filters/fblock_cpu.c

@@ -19,7 +19,7 @@
 void cpu_func(void *buffers[], void *cl_arg)
 {
         unsigned i, j, k;
-        int *factor = cl_arg;
+        int *factor = (int *) cl_arg;
 	int *block = (int *)STARPU_BLOCK_GET_PTR(buffers[0]);
 	int nx = (int)STARPU_BLOCK_GET_NX(buffers[0]);
 	int ny = (int)STARPU_BLOCK_GET_NY(buffers[0]);

+ 1 - 1
examples/filters/fmatrix.c

@@ -25,7 +25,7 @@
 void cpu_func(void *buffers[], void *cl_arg)
 {
         unsigned i, j;
-        int *factor = cl_arg;
+        int *factor = (int *) cl_arg;
 
         /* length of the matrix */
         unsigned nx = STARPU_MATRIX_GET_NX(buffers[0]);

+ 1 - 1
examples/filters/fvector.c

@@ -24,7 +24,7 @@
 void cpu_func(void *buffers[], void *cl_arg)
 {
         unsigned i;
-        int *factor = cl_arg;
+        int *factor = (int *) cl_arg;
 
         /* length of the vector */
         unsigned n = STARPU_VECTOR_GET_NX(buffers[0]);

+ 1 - 1
examples/mandelbrot/mandelbrot.c

@@ -333,7 +333,7 @@ static void compute_block_spmd(void *descr[], void *cl_arg)
 
 	while (1)
 	{
-		local_iy = STARPU_ATOMIC_ADD(pcnt, 1) - 1;
+		local_iy = STARPU_ATOMIC_ADD((unsigned int *)pcnt, 1) - 1;
 		if (local_iy >= block_size)
 			break;
 

+ 6 - 6
examples/ppm_downscaler/ppm_downscaler.c

@@ -28,7 +28,7 @@
 
 struct ppm_image *allocate_new_ppm(int ncols, int nlines, int coldepth)
 {
-	struct ppm_image *ppm = malloc(sizeof(struct ppm_image));
+	struct ppm_image *ppm = (struct ppm_image *) malloc(sizeof(struct ppm_image));
 	assert(ppm);
 
 	ppm->ncols = ncols;
@@ -36,9 +36,9 @@ struct ppm_image *allocate_new_ppm(int ncols, int nlines, int coldepth)
 	ppm->coldepth = coldepth;
 
 #ifdef STARPU_HAVE_MEMALIGN
-	ppm->data = memalign(16384, ncols*nlines*sizeof(struct ppm_color));
+	ppm->data = (struct ppm_color *) memalign(16384, ncols*nlines*sizeof(struct ppm_color));
 #else
-	ppm->data = malloc(ncols*nlines*sizeof(struct ppm_color));
+	ppm->data = (struct ppm_color *) malloc(ncols*nlines*sizeof(struct ppm_color));
 #endif
 	assert(ppm->data);
 
@@ -49,7 +49,7 @@ struct ppm_image *file_to_ppm(char *filename)
 {
 	int ret;
 
-	struct ppm_image *ppm = malloc(sizeof(struct ppm_image));
+	struct ppm_image *ppm = (struct ppm_image *) malloc(sizeof(struct ppm_image));
 	assert(ppm);
 	
 	FILE *file = fopen(filename, "r");
@@ -64,9 +64,9 @@ struct ppm_image *file_to_ppm(char *filename)
 	
 	/* allocate a buffer for the image */
 #ifdef STARPU_HAVE_MEMALIGN
-	ppm->data = memalign(16384, ppm->ncols*ppm->nlines*sizeof(struct ppm_color));
+	ppm->data = (struct ppm_color *) memalign(16384, ppm->ncols*ppm->nlines*sizeof(struct ppm_color));
 #else
-	ppm->data = malloc(ppm->ncols*ppm->nlines*sizeof(struct ppm_color));
+	ppm->data = (struct ppm_color *) malloc(ppm->ncols*ppm->nlines*sizeof(struct ppm_color));
 #endif
 	assert(ppm->data);
 

+ 8 - 8
examples/ppm_downscaler/yuv_downscaler.c

@@ -123,7 +123,7 @@ int main(int argc, char **argv)
 	FILE *f_in = fopen(filename_in, "r");
 	assert(f_in);
 
-	struct yuv_frame *yuv_in_buffer = malloc(nframes*FRAMESIZE);
+	struct yuv_frame *yuv_in_buffer = (struct yuv_frame *) malloc(nframes*FRAMESIZE);
 	fread(yuv_in_buffer, FRAMESIZE, nframes, f_in);
 
 	/* allocate room for an output buffer */
@@ -131,16 +131,16 @@ int main(int argc, char **argv)
 	assert(f_out);
 
 /*	fprintf(stderr, "Alloc output file ...\n"); */
-	struct yuv_new_frame *yuv_out_buffer = calloc(nframes, NEW_FRAMESIZE);
+	struct yuv_new_frame *yuv_out_buffer = (struct yuv_new_frame *) calloc(nframes, NEW_FRAMESIZE);
 	assert(yuv_out_buffer);
 
-	starpu_data_handle *frame_y_handle = calloc(nframes, sizeof(starpu_data_handle));
-	starpu_data_handle *frame_u_handle = calloc(nframes, sizeof(starpu_data_handle));
-	starpu_data_handle *frame_v_handle = calloc(nframes, sizeof(starpu_data_handle));
+	starpu_data_handle *frame_y_handle = (starpu_data_handle *)  calloc(nframes, sizeof(starpu_data_handle));
+	starpu_data_handle *frame_u_handle = (starpu_data_handle *)  calloc(nframes, sizeof(starpu_data_handle));
+	starpu_data_handle *frame_v_handle = (starpu_data_handle *)  calloc(nframes, sizeof(starpu_data_handle));
 
-	starpu_data_handle *new_frame_y_handle = calloc(nframes, sizeof(starpu_data_handle));
-	starpu_data_handle *new_frame_u_handle = calloc(nframes, sizeof(starpu_data_handle));
-	starpu_data_handle *new_frame_v_handle = calloc(nframes, sizeof(starpu_data_handle));
+	starpu_data_handle *new_frame_y_handle = (starpu_data_handle *)  calloc(nframes, sizeof(starpu_data_handle));
+	starpu_data_handle *new_frame_u_handle = (starpu_data_handle *)  calloc(nframes, sizeof(starpu_data_handle));
+	starpu_data_handle *new_frame_v_handle = (starpu_data_handle *)  calloc(nframes, sizeof(starpu_data_handle));
 
 	starpu_init(NULL);
 

+ 1 - 1
examples/profiling/profiling.c

@@ -53,7 +53,7 @@ int main(int argc, char **argv)
 		.nbuffers = 0
 	};
 
-	struct starpu_task **tasks = malloc(niter*sizeof(struct starpu_task *));
+	struct starpu_task **tasks = (struct starpu_task **) malloc(niter*sizeof(struct starpu_task *));
 	assert(tasks);
 
 	unsigned i;

+ 4 - 4
examples/reductions/dot_product.c

@@ -164,11 +164,11 @@ int main(int argc, char **argv)
 	unsigned long nelems = nblocks*entries_per_block;
 	size_t size = nelems*sizeof(float);
 
-	x = malloc(size);
-	y = malloc(size);
+	x = (float *) malloc(size);
+	y = (float *) malloc(size);
 
-	x_handles = calloc(nblocks, sizeof(starpu_data_handle));
-	y_handles = calloc(nblocks, sizeof(starpu_data_handle));
+	x_handles = (starpu_data_handle *) calloc(nblocks, sizeof(starpu_data_handle));
+	y_handles = (starpu_data_handle *) calloc(nblocks, sizeof(starpu_data_handle));
 
 	assert(x && y);
 

+ 2 - 2
examples/reductions/minmax_reduction.c

@@ -129,8 +129,8 @@ int main(int argc, char **argv)
 	unsigned long nelems = nblocks*entries_per_bock;
 	size_t size = nelems*sizeof(TYPE);
 
-	x = malloc(size);
-	x_handles = calloc(nblocks, sizeof(starpu_data_handle));
+	x = (TYPE *) malloc(size);
+	x_handles = (starpu_data_handle *) calloc(nblocks, sizeof(starpu_data_handle));
 	
 	assert(x && x_handles);
 

+ 2 - 2
examples/spmv/spmv.c

@@ -44,8 +44,8 @@ static void parse_args(int argc, char **argv)
  * same number of non-zero entries. */
 static void csr_filter_func(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nparts)
 {
-	starpu_csr_interface_t *csr_father = father_interface;
-	starpu_csr_interface_t *csr_child = child_interface;
+	starpu_csr_interface_t *csr_father = (starpu_csr_interface_t *) father_interface;
+	starpu_csr_interface_t *csr_child = (starpu_csr_interface_t *) child_interface;
 
 	uint32_t nrow = csr_father->nrow;
 	size_t elemsize = csr_father->elemsize;

+ 2 - 2
examples/stencil/stencil-blocks.c

@@ -90,7 +90,7 @@ int MPI_TAG1(int z, int iter, int dir)
 /* Compute the size of the different blocks */
 static void compute_block_sizes(void)
 {
-	block_sizes_z = malloc(nbz*sizeof(unsigned));
+	block_sizes_z = (unsigned *) malloc(nbz*sizeof(unsigned));
 	STARPU_ASSERT(block_sizes_z);
 
 	/* Perhaps the last chunk is smaller */
@@ -136,7 +136,7 @@ void create_blocks_array(unsigned _sizex, unsigned _sizey, unsigned _sizez, unsi
 	sizez = _sizez;
 
 	/* Create a grid of block descriptors */
-	blocks = calloc(nbz, sizeof(struct block_description));
+	blocks = (struct block_description *) calloc(nbz, sizeof(struct block_description));
 	STARPU_ASSERT(blocks);
 
 	/* What is the size of the different blocks ? */

+ 31 - 23
examples/stencil/stencil-kernels.c

@@ -165,10 +165,12 @@ static void check_load(starpu_block_interface_t *block, starpu_block_interface_t
 /*
  * Load a neighbour's boundary into block, CPU version
  */
-static void load_subblock_from_buffer_cpu(starpu_block_interface_t *block,
-					starpu_block_interface_t *boundary,
+static void load_subblock_from_buffer_cpu(void *_block,
+					void *_boundary,
 					unsigned firstz)
 {
+	starpu_block_interface_t *block = (starpu_block_interface_t *)_block;
+	starpu_block_interface_t *boundary = (starpu_block_interface_t *)_boundary;
 	check_load(block, boundary);
 
 	/* We do a contiguous memory transfer */
@@ -184,10 +186,12 @@ static void load_subblock_from_buffer_cpu(starpu_block_interface_t *block,
  * Load a neighbour's boundary into block, CUDA version
  */
 #ifdef STARPU_USE_CUDA
-static void load_subblock_from_buffer_cuda(starpu_block_interface_t *block,
-					starpu_block_interface_t *boundary,
+static void load_subblock_from_buffer_cuda(void *_block,
+					void *_boundary,
 					unsigned firstz)
 {
+	starpu_block_interface_t *block = (starpu_block_interface_t *)_block;
+	starpu_block_interface_t *boundary = (starpu_block_interface_t *)_boundary;
 	check_load(block, boundary);
 
 	/* We do a contiguous memory transfer */
@@ -245,7 +249,7 @@ fprintf(stderr,"!!! DO update_func_cuda z %d CUDA%d !!!\n", block->bz, workerid)
 	for (i=1; i<=K; i++)
 	{
 		starpu_block_interface_t *oldb = descr[i%2], *newb = descr[(i+1)%2];
-		TYPE *old = (void*) oldb->ptr, *new = (void*) newb->ptr;
+		TYPE *old = (void*) oldb->ptr, *newer = (void*) newb->ptr;
 
 		/* Shadow data */
 		cuda_shadow_host(block->bz, old, oldb->nx, oldb->ny, oldb->nz, oldb->ldy, oldb->ldz, i);
@@ -254,7 +258,7 @@ fprintf(stderr,"!!! DO update_func_cuda z %d CUDA%d !!!\n", block->bz, workerid)
 #ifdef LIFE
 		cuda_life_update_host(block->bz, old, new, oldb->nx, oldb->ny, oldb->nz, oldb->ldy, oldb->ldz, i);
 #else
-		cudaMemcpyAsync(new, old, oldb->nx * oldb->ny * oldb->nz * sizeof(*new), cudaMemcpyDeviceToDevice, starpu_cuda_get_local_stream());
+		cudaMemcpyAsync(new, old, oldb->nx * oldb->ny * oldb->nz * sizeof(*newer), cudaMemcpyDeviceToDevice, starpu_cuda_get_local_stream());
 #endif /* LIFE */
 	}
 
@@ -338,7 +342,7 @@ fprintf(stderr,"!!! DO update_func_opencl z %d OPENCL%d !!!\n", block->bz, worke
 	for (i=1; i<=K; i++)
 	{
 		starpu_block_interface_t *oldb = descr[i%2], *newb = descr[(i+1)%2];
-		TYPE *old = (void*) oldb->ptr, *new = (void*) newb->ptr;
+		TYPE *old = (void*) oldb->ptr, *newer = (void*) newb->ptr;
 
 		/* Shadow data */
 		opencl_shadow_host(block->bz, old, oldb->nx, oldb->ny, oldb->nz, oldb->ldy, oldb->ldz, i);
@@ -347,7 +351,7 @@ fprintf(stderr,"!!! DO update_func_opencl z %d OPENCL%d !!!\n", block->bz, worke
 #ifdef LIFE
 		opencl_life_update_host(block->bz, old, new, oldb->nx, oldb->ny, oldb->nz, oldb->ldy, oldb->ldz, i);
 #else
-                clEnqueueCopyBuffer(cq, old, new, 0, 0, oldb->nx * oldb->ny * oldb->nz * sizeof(*new), 0, NULL, NULL);
+                clEnqueueCopyBuffer(cq, old, new, 0, 0, oldb->nx * oldb->ny * oldb->nz * sizeof(*newer), 0, NULL, NULL);
 #endif /* LIFE */
 	}
 
@@ -365,7 +369,7 @@ fprintf(stderr,"!!! DO update_func_opencl z %d OPENCL%d !!!\n", block->bz, worke
  */
 static void update_func_cpu(void *descr[], void *arg)
 {
-	struct block_description *block = arg;
+	struct block_description *block = (struct block_description *) arg;
 	int workerid = starpu_worker_get_id();
 	DEBUG( "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
 	if (block->bz == 0)
@@ -405,8 +409,8 @@ fprintf(stderr,"!!! DO update_func_cpu z %d CPU%d !!!\n", block->bz, workerid);
 
 	for (i=1; i<=K; i++)
 	{
-		starpu_block_interface_t *oldb = descr[i%2], *newb = descr[(i+1)%2];
-		TYPE *old = (void*) oldb->ptr, *new = (void*) newb->ptr;
+		starpu_block_interface_t *oldb = (starpu_block_interface_t *) descr[i%2], *newb = (starpu_block_interface_t *) descr[(i+1)%2];
+		TYPE *old = (TYPE*) oldb->ptr, *newer = (TYPE*) newb->ptr;
 
 		/* Shadow data */
 		unsigned ldy = oldb->ldy, ldz = oldb->ldz;
@@ -424,9 +428,9 @@ fprintf(stderr,"!!! DO update_func_cpu z %d CPU%d !!!\n", block->bz, workerid);
 
 		/* And perform actual computation */
 #ifdef LIFE
-		life_update(block->bz, old, new, oldb->nx, oldb->ny, oldb->nz, oldb->ldy, oldb->ldz, i);
+		life_update(block->bz, old, newer, oldb->nx, oldb->ny, oldb->nz, oldb->ldy, oldb->ldz, i);
 #else
-		memcpy(new, old, oldb->nx * oldb->ny * oldb->nz * sizeof(*new));
+		memcpy(newer, old, oldb->nx * oldb->ny * oldb->nz * sizeof(*newer));
 #endif /* LIFE */
 	}
 
@@ -465,10 +469,12 @@ starpu_codelet cl_update = {
  */
 
 /* CPU version */
-static void load_subblock_into_buffer_cpu(starpu_block_interface_t *block,
-					starpu_block_interface_t *boundary,
+static void load_subblock_into_buffer_cpu(void *_block,
+					void *_boundary,
 					unsigned firstz)
 {
+	starpu_block_interface_t *block = (starpu_block_interface_t *)_block;
+	starpu_block_interface_t *boundary = (starpu_block_interface_t *)_boundary;
 	check_load(block, boundary);
 
 	/* We do a contiguous memory transfer */
@@ -482,10 +488,12 @@ static void load_subblock_into_buffer_cpu(starpu_block_interface_t *block,
 
 /* CUDA version */
 #ifdef STARPU_USE_CUDA
-static void load_subblock_into_buffer_cuda(starpu_block_interface_t *block,
-					starpu_block_interface_t *boundary,
+static void load_subblock_into_buffer_cuda(void *_block,
+					void *_boundary,
 					unsigned firstz)
 {
+	starpu_block_interface_t *block = (starpu_block_interface_t *)_block;
+	starpu_block_interface_t *boundary = (starpu_block_interface_t *)_boundary;
 	check_load(block, boundary);
 
 	/* We do a contiguous memory transfer */
@@ -527,7 +535,7 @@ unsigned bottom_per_worker[STARPU_NMAXWORKERS];
 /* top save, CPU version */
 static void dummy_func_top_cpu(void *descr[] __attribute__((unused)), void *arg)
 {
-	struct block_description *block = arg;
+	struct block_description *block = (struct block_description *) arg;
 	int workerid = starpu_worker_get_id();
 	top_per_worker[workerid]++;
 
@@ -543,7 +551,7 @@ static void dummy_func_top_cpu(void *descr[] __attribute__((unused)), void *arg)
 /* bottom save, CPU version */
 static void dummy_func_bottom_cpu(void *descr[] __attribute__((unused)), void *arg)
 {
-	struct block_description *block = arg;
+	struct block_description *block = (struct block_description *) arg;
 	int workerid = starpu_worker_get_id();
 	bottom_per_worker[workerid]++;
 
@@ -557,7 +565,7 @@ static void dummy_func_bottom_cpu(void *descr[] __attribute__((unused)), void *a
 #ifdef STARPU_USE_CUDA
 static void dummy_func_top_cuda(void *descr[] __attribute__((unused)), void *arg)
 {
-	struct block_description *block = arg;
+	struct block_description *block = (struct block_description *) arg;
 	int workerid = starpu_worker_get_id();
 	top_per_worker[workerid]++;
 
@@ -574,7 +582,7 @@ static void dummy_func_top_cuda(void *descr[] __attribute__((unused)), void *arg
 /* bottom save, CUDA version */
 static void dummy_func_bottom_cuda(void *descr[] __attribute__((unused)), void *arg)
 {
-	struct block_description *block = arg;
+	struct block_description *block = (struct block_description *) arg;
 	int workerid = starpu_worker_get_id();
 	bottom_per_worker[workerid]++;
 
@@ -590,7 +598,7 @@ static void dummy_func_bottom_cuda(void *descr[] __attribute__((unused)), void *
 #ifdef STARPU_USE_OPENCL
 static void dummy_func_top_opencl(void *descr[] __attribute__((unused)), void *arg)
 {
-	struct block_description *block = arg;
+	struct block_description *block = (struct block_description *) arg;
 	int workerid = starpu_worker_get_id();
 	top_per_worker[workerid]++;
 
@@ -610,7 +618,7 @@ static void dummy_func_top_opencl(void *descr[] __attribute__((unused)), void *a
 /* bottom save, OPENCL version */
 static void dummy_func_bottom_opencl(void *descr[] __attribute__((unused)), void *arg)
 {
-	struct block_description *block = arg;
+	struct block_description *block = (struct block_description *) arg;
 	int workerid = starpu_worker_get_id();
 	bottom_per_worker[workerid]++;
 

+ 3 - 3
examples/stencil/stencil.c

@@ -132,9 +132,9 @@ static void init_problem(int argc, char **argv, int rank, int world_size)
 	display_memory_consumption(rank);
 
 	who_runs_what_len = 2*niter;
-	who_runs_what = calloc(nbz * who_runs_what_len, sizeof(*who_runs_what));
-	who_runs_what_index = calloc(nbz, sizeof(*who_runs_what_index));
-	last_tick = calloc(nbz, sizeof(*last_tick));
+	who_runs_what = (int *) calloc(nbz * who_runs_what_len, sizeof(*who_runs_what));
+	who_runs_what_index = (int *) calloc(nbz, sizeof(*who_runs_what_index));
+	last_tick = (timeval *) calloc(nbz, sizeof(*last_tick));
 }
 
 /*

+ 1 - 1
examples/tag_example/tag_restartable.c

@@ -134,7 +134,7 @@ int main(int argc __attribute__((unused)) , char **argv __attribute__((unused)))
 	FPRINTF(stderr, "ITER : %u\n", nk);
 
 	for (i = 0; i < Nrolls; i++) {
-		tasks[i] = malloc(ni * sizeof(*tasks[i]));
+		tasks[i] = (struct starpu_task **) malloc(ni * sizeof(*tasks[i]));
 
 		create_task_grid(i);
 	}

+ 3 - 3
examples/top/hello_world_top.c

@@ -62,7 +62,7 @@ struct params {
 };
 void cpu_func(void *buffers[], void *cl_arg)
 {
-	struct params *params = cl_arg;
+	struct params *params = (struct params *) cl_arg;
 
 	//loosing time for top example...
 	int sum = 0;
@@ -82,14 +82,14 @@ void cpu_func(void *buffers[], void *cl_arg)
 
 void callback_name_changed(starputop_param* param)
 {
-	char* message = malloc(256);
+	char* message = (char *) malloc(256);
 	sprintf(message, "Name have been changed to %s", names[name_selected]);
 	starputop_debug_log(message);
 }
 
 void callback_number_addition_changed(starputop_param* param)
 {
-	char* message = malloc(256);
+	char* message = (char *) malloc(256);
 	sprintf(message, "Number of addition is now %d", number_of_addition);
 
 	starputop_debug_log(message);

+ 2 - 2
src/common/htable32.c

@@ -75,7 +75,7 @@ void *_starpu_htbl_insert_32(struct starpu_htbl32_node_s **htbl, uint32_t key, v
 		//printf("insert : current bit = %d \n", currentbit);
 		if (*current_htbl_ptr == NULL) {
 			/* TODO pad to change that 1 into 16 ? */
-			*current_htbl_ptr = calloc(sizeof(starpu_htbl32_node_t), 1);
+			*current_htbl_ptr = (starpu_htbl32_node_t*)calloc(sizeof(starpu_htbl32_node_t), 1);
 			assert(*current_htbl_ptr);
 		}
 
@@ -98,7 +98,7 @@ void *_starpu_htbl_insert_32(struct starpu_htbl32_node_s **htbl, uint32_t key, v
 	/* current_htbl either contains NULL or a previous entry 
 	 * we overwrite it anyway */
 	void *old_entry = *current_htbl_ptr;
-	*current_htbl_ptr = entry;
+	*current_htbl_ptr = (starpu_htbl32_node_t *) entry;
 
 	return old_entry;
 }

+ 1 - 1
src/core/combined_workers.c

@@ -99,7 +99,7 @@ int starpu_combined_worker_assign_workerid(int nworkers, int workerid_array[])
 		&config->combined_workers[combined_worker_id];
 
 	combined_worker->worker_size = nworkers;
-	combined_worker->perf_arch = STARPU_CPU_DEFAULT + nworkers - 1;
+	combined_worker->perf_arch = (starpu_perf_archtype) (STARPU_CPU_DEFAULT + nworkers - 1);
 	combined_worker->worker_mask = STARPU_CPU;
 
 	/* We assume that the memory node should either be that of the first

+ 2 - 2
src/core/dependencies/cg.c

@@ -32,7 +32,7 @@ void _starpu_cg_list_init(struct starpu_cg_list_s *list)
 	/* this is a small initial default value ... may be changed */
 	list->succ_list_size = 0;
 	list->succ =
-		realloc(NULL, list->succ_list_size*sizeof(struct starpu_cg_s *));
+		(struct starpu_cg_s **) realloc(NULL, list->succ_list_size*sizeof(struct starpu_cg_s *));
 #endif
 }
 
@@ -72,7 +72,7 @@ void _starpu_add_successor_to_cg_list(struct starpu_cg_list_s *successors, starp
 			successors->succ_list_size = 4;
 
 		/* NB: this is thread safe as the tag->lock is taken */
-		successors->succ = realloc(successors->succ, 
+		successors->succ = (struct starpu_cg_s **) realloc(successors->succ, 
 			successors->succ_list_size*sizeof(struct starpu_cg_s *));
 	}
 #else

+ 2 - 2
src/core/dependencies/htable.c

@@ -69,7 +69,7 @@ void *_starpu_htbl_insert_tag(starpu_htbl_node_t **htbl, starpu_tag_t tag, void
 	{
 		if (*current_htbl_ptr == NULL) {
 			/* TODO pad to change that 1 into 16 ? */
-			*current_htbl_ptr = calloc(1, sizeof(starpu_htbl_node_t));
+			*current_htbl_ptr = (starpu_htbl_node_t *) calloc(1, sizeof(starpu_htbl_node_t));
 			assert(*current_htbl_ptr);
 
 			if (previous_htbl_ptr)
@@ -97,7 +97,7 @@ void *_starpu_htbl_insert_tag(starpu_htbl_node_t **htbl, starpu_tag_t tag, void
 	/* current_htbl either contains NULL or a previous entry 
 	 * we overwrite it anyway */
 	void *old_entry = *current_htbl_ptr;
-	*current_htbl_ptr = entry;
+	*current_htbl_ptr = (starpu_htbl_node_t *) entry;
 
 	if (!old_entry)
 		previous_htbl_ptr->nentries++;

+ 4 - 4
src/core/dependencies/implicit_data_deps.c

@@ -31,7 +31,7 @@
 static void _starpu_add_reader_after_writer(starpu_data_handle handle, struct starpu_task *pre_sync_task, struct starpu_task *post_sync_task)
 {
 	/* Add this task to the list of readers */
-	struct starpu_task_wrapper_list *link = malloc(sizeof(struct starpu_task_wrapper_list));
+	struct starpu_task_wrapper_list *link = (struct starpu_task_wrapper_list *) malloc(sizeof(struct starpu_task_wrapper_list));
 	link->task = post_sync_task;
 	link->next = handle->last_submitted_readers;
 	handle->last_submitted_readers = link;
@@ -162,7 +162,7 @@ static void _starpu_add_writer_after_writer(starpu_data_handle handle, struct st
 
 static void disable_last_writer_callback(void *cl_arg)
 {
-	starpu_data_handle handle = cl_arg;
+	starpu_data_handle handle = (starpu_data_handle) cl_arg;
 	
 	/* NB: we don't take the handle->sequential_consistency_mutex mutex
 	 * because the empty task that is used for synchronization is going to
@@ -361,7 +361,7 @@ void _starpu_release_data_enforce_sequential_consistency(struct starpu_task *tas
 				{
 					/* Save the job id of the reader task in the ghost reader linked list list */
 					starpu_job_t ghost_reader_job = _starpu_get_job_associated_to_task(task);
-					struct starpu_jobid_list *link = malloc(sizeof(struct starpu_jobid_list));
+					struct starpu_jobid_list *link = (struct starpu_jobid_list *) malloc(sizeof(struct starpu_jobid_list));
 					STARPU_ASSERT(link);
 					link->next = handle->last_submitted_ghost_readers_id;
 					link->id = ghost_reader_job->job_id; 
@@ -403,7 +403,7 @@ void _starpu_add_post_sync_tasks(struct starpu_task *post_sync_task, starpu_data
 	{
 		handle->post_sync_tasks_cnt++;
 
-		struct starpu_task_wrapper_list *link = malloc(sizeof(struct starpu_task_wrapper_list));
+		struct starpu_task_wrapper_list *link = (struct starpu_task_wrapper_list *) malloc(sizeof(struct starpu_task_wrapper_list));
 		link->task = post_sync_task;
 		link->next = handle->post_sync_tasks;
 		handle->post_sync_tasks = link;		

+ 5 - 5
src/core/dependencies/tags.c

@@ -30,7 +30,7 @@ static pthread_rwlock_t tag_global_rwlock = PTHREAD_RWLOCK_INITIALIZER;
 
 static starpu_cg_t *create_cg_apps(unsigned ntags)
 {
-	starpu_cg_t *cg = malloc(sizeof(starpu_cg_t));
+	starpu_cg_t *cg = (starpu_cg_t *) malloc(sizeof(starpu_cg_t));
 	STARPU_ASSERT(cg);
 
 	cg->ntags = ntags;
@@ -47,7 +47,7 @@ static starpu_cg_t *create_cg_apps(unsigned ntags)
 
 static starpu_cg_t *create_cg_tag(unsigned ntags, struct starpu_tag_s *tag)
 {
-	starpu_cg_t *cg = malloc(sizeof(starpu_cg_t));
+	starpu_cg_t *cg = (starpu_cg_t *) malloc(sizeof(starpu_cg_t));
 	STARPU_ASSERT(cg);
 
 	cg->ntags = ntags;
@@ -63,7 +63,7 @@ static starpu_cg_t *create_cg_tag(unsigned ntags, struct starpu_tag_s *tag)
 static struct starpu_tag_s *_starpu_tag_init(starpu_tag_t id)
 {
 	struct starpu_tag_s *tag;
-	tag = malloc(sizeof(struct starpu_tag_s));
+	tag = (struct starpu_tag_s *) malloc(sizeof(struct starpu_tag_s));
 	STARPU_ASSERT(tag);
 
 	tag->job = NULL;
@@ -86,7 +86,7 @@ void starpu_tag_remove(starpu_tag_t id)
 
 	pthread_rwlock_wrlock(&tag_global_rwlock);
 
-	tag = _starpu_htbl_remove_tag(tag_htbl, id);
+	tag = (struct starpu_tag_s *) _starpu_htbl_remove_tag(tag_htbl, id);
 
 	pthread_rwlock_unlock(&tag_global_rwlock);
 
@@ -124,7 +124,7 @@ static struct starpu_tag_s *gettag_struct(starpu_tag_t id)
 
 	/* search if the tag is already declared or not */
 	struct starpu_tag_s *tag;
-	tag = _starpu_htbl_search_tag(tag_htbl, id);
+	tag = (struct starpu_tag_s *) _starpu_htbl_search_tag(tag_htbl, id);
 
 	if (tag == NULL) {
 		/* the tag does not exist yet : create an entry */

+ 1 - 1
src/core/dependencies/task_deps.c

@@ -28,7 +28,7 @@
 
 static starpu_cg_t *create_cg_task(unsigned ntags, starpu_job_t j)
 {
-	starpu_cg_t *cg = malloc(sizeof(starpu_cg_t));
+	starpu_cg_t *cg = (starpu_cg_t *) malloc(sizeof(starpu_cg_t));
 	STARPU_ASSERT(cg);
 
 	cg->ntags = ntags;

+ 1 - 1
src/core/parallel_task.c

@@ -22,7 +22,7 @@
 
 struct starpu_task *_starpu_create_task_alias(struct starpu_task *task)
 {
-	struct starpu_task *task_dup = malloc(sizeof(struct starpu_task));
+	struct starpu_task *task_dup = (struct starpu_task *) malloc(sizeof(struct starpu_task));
 	STARPU_ASSERT(task_dup);
 
 	/* XXX perhaps this is a bit too much overhead and we should only copy

+ 8 - 8
src/core/perfmodel/perfmodel_history.c

@@ -46,12 +46,12 @@ static void insert_history_entry(struct starpu_history_entry_t *entry, struct st
 	struct starpu_history_list_t *link;
 	struct starpu_history_entry_t *old;
 
-	link = malloc(sizeof(struct starpu_history_list_t));
+	link = (struct starpu_history_list_t *) malloc(sizeof(struct starpu_history_list_t));
 	link->next = *list;
 	link->entry = entry;
 	*list = link;
 
-	old = _starpu_htbl_insert_32(history_ptr, entry->footprint, entry);
+	old = (struct starpu_history_entry_t *) _starpu_htbl_insert_32(history_ptr, entry->footprint, entry);
 	/* that may fail in case there is some concurrency issue */
 	STARPU_ASSERT(old == NULL);
 }
@@ -191,7 +191,7 @@ static void parse_per_arch_model_file(FILE *f, struct starpu_per_arch_perfmodel_
 		struct starpu_history_entry_t *entry = NULL;
 		if (scan_history)
 		{
-			entry = malloc(sizeof(struct starpu_history_entry_t));
+			entry = (struct starpu_history_entry_t *) malloc(sizeof(struct starpu_history_entry_t));
 			STARPU_ASSERT(entry);
 		}
 
@@ -254,7 +254,7 @@ static void dump_model_file(FILE *f, struct starpu_perfmodel_t *model)
 	for (arch = 0; arch < STARPU_NARCH_VARIATIONS; arch++)
 	{
 		char archname[32];
-		starpu_perfmodel_get_arch_name(arch, archname, 32);
+		starpu_perfmodel_get_arch_name((starpu_perf_archtype) arch, archname, 32);
 		fprintf(f, "# Model for %s\n", archname);
 		dump_per_arch_model_file(f, model, arch);
 		fprintf(f, "\n##################\n");
@@ -299,7 +299,7 @@ static void get_model_debug_path(struct starpu_perfmodel_t *model, const char *a
 void _starpu_register_model(struct starpu_perfmodel_t *model)
 {
 	/* add the model to a linked list */
-	struct starpu_model_list_t *node = malloc(sizeof(struct starpu_model_list_t));
+	struct starpu_model_list_t *node = (struct starpu_model_list_t *) malloc(sizeof(struct starpu_model_list_t));
 
 	node->model = model;
 	//model->debug_modelid = debug_modelid++;
@@ -647,7 +647,7 @@ double _starpu_history_based_job_expected_perf(struct starpu_perfmodel_t *model,
 		return -1.0;
 
 	PTHREAD_RWLOCK_RDLOCK(&model->model_rwlock);
-	entry = _starpu_htbl_search_32(history, key);
+	entry = (struct starpu_history_entry_t *) _starpu_htbl_search_32(history, key);
 	PTHREAD_RWLOCK_UNLOCK(&model->model_rwlock);
 
 	exp = entry?entry->mean:-1.0;
@@ -684,12 +684,12 @@ void _starpu_update_perfmodel_history(starpu_job_t j, struct starpu_perfmodel_t
 			history_ptr = &per_arch_model->history;
 			list = &per_arch_model->list;
 
-			entry = _starpu_htbl_search_32(history, key);
+			entry = (struct starpu_history_entry_t *) _starpu_htbl_search_32(history, key);
 
 			if (!entry)
 			{
 				/* this is the first entry with such a footprint */
-				entry = malloc(sizeof(struct starpu_history_entry_t));
+				entry = (struct starpu_history_entry_t *) malloc(sizeof(struct starpu_history_entry_t));
 				STARPU_ASSERT(entry);
 					entry->mean = measured;
 					entry->sum = measured;

+ 2 - 2
src/core/perfmodel/regression.c

@@ -161,10 +161,10 @@ int _starpu_regression_non_linear_power(struct starpu_history_list_t *ptr, doubl
 {
 	unsigned n = find_list_size(ptr);
 
-	unsigned *x = malloc(n*sizeof(unsigned));
+	unsigned *x = (unsigned *) malloc(n*sizeof(unsigned));
 	STARPU_ASSERT(x);
 
-	double *y = malloc(n*sizeof(double));
+	double *y = (double *) malloc(n*sizeof(double));
 	STARPU_ASSERT(y);
 
 	dump_list(x, y, ptr);

+ 2 - 2
src/core/task.c

@@ -114,7 +114,7 @@ struct starpu_task * __attribute__((malloc)) starpu_task_create(void)
 {
 	struct starpu_task *task;
 
-	task = calloc(1, sizeof(struct starpu_task));
+	task = (struct starpu_task *) calloc(1, sizeof(struct starpu_task));
 	STARPU_ASSERT(task);
 
 	starpu_task_init(task);
@@ -377,7 +377,7 @@ void _starpu_initialize_current_task_key(void)
  * being executed at the moment. */
 struct starpu_task *starpu_get_current_task(void)
 {
-	return pthread_getspecific(current_task_key);
+	return (struct starpu_task *) pthread_getspecific(current_task_key);
 }
 
 void _starpu_set_current_task(struct starpu_task *task)

+ 3 - 3
src/core/task_bundle.c

@@ -78,7 +78,7 @@ int starpu_task_bundle_insert(struct starpu_task_bundle *bundle, struct starpu_t
 
 	/* Insert a task at the end of the bundle */
 	struct starpu_task_bundle_entry *entry;
-	entry = malloc(sizeof(struct starpu_task_bundle_entry));
+	entry = (struct starpu_task_bundle_entry *) malloc(sizeof(struct starpu_task_bundle_entry));
 	STARPU_ASSERT(entry);
 	entry->task = task;
 	entry->next = NULL;
@@ -245,7 +245,7 @@ static void insertion_handle_sorted(struct handle_list **listp, starpu_data_hand
 	if (!list || list->handle > handle)
 	{
 		/* We insert the first element of the list */
-		struct handle_list *link = malloc(sizeof(struct handle_list));
+		struct handle_list *link = (struct handle_list *) malloc(sizeof(struct handle_list));
 		STARPU_ASSERT(link);
 		link->handle = handle;
 		link->mode = mode;
@@ -272,7 +272,7 @@ static void insertion_handle_sorted(struct handle_list **listp, starpu_data_hand
 	}
 	else {
 		/* The handle was not in the list, we insert it after prev */
-		struct handle_list *link = malloc(sizeof(struct handle_list));
+		struct handle_list *link = (struct handle_list *) malloc(sizeof(struct handle_list));
 		STARPU_ASSERT(link);
 		link->handle = handle;
 		link->mode = mode;

+ 5 - 5
src/core/workers.c

@@ -48,22 +48,22 @@ struct starpu_machine_config_s *_starpu_get_machine_config(void)
 /* in case a task is submitted, we may check whether there exists a worker
    that may execute the task or not */
 
-inline uint32_t _starpu_worker_exists(uint32_t task_mask)
+uint32_t _starpu_worker_exists(uint32_t task_mask)
 {
 	return (task_mask & config.worker_mask);
 } 
 
-inline uint32_t _starpu_may_submit_cuda_task(void)
+uint32_t _starpu_may_submit_cuda_task(void)
 {
 	return (STARPU_CUDA & config.worker_mask);
 }
 
-inline uint32_t _starpu_may_submit_cpu_task(void)
+uint32_t _starpu_may_submit_cpu_task(void)
 {
 	return (STARPU_CPU & config.worker_mask);
 }
 
-inline uint32_t _starpu_may_submit_opencl_task(void)
+uint32_t _starpu_may_submit_opencl_task(void)
 {
 	return (STARPU_OPENCL & config.worker_mask);
 }
@@ -260,7 +260,7 @@ void _starpu_set_local_worker_key(struct starpu_worker_s *worker)
 
 struct starpu_worker_s *_starpu_get_local_worker_key(void)
 {
-	return pthread_getspecific(worker_key);
+	return (struct starpu_worker_s *) pthread_getspecific(worker_key);
 }
 
 /* Initialize the starpu_conf with default values */

+ 1 - 1
src/datawizard/coherency.c

@@ -426,7 +426,7 @@ static int fetch_data(starpu_data_handle handle, struct starpu_data_replicate_s
 	return _starpu_fetch_data_on_node(handle, replicate, mode, 0, NULL, NULL);
 }
 
-inline uint32_t _starpu_get_data_refcnt(starpu_data_handle handle, uint32_t node)
+uint32_t _starpu_get_data_refcnt(starpu_data_handle handle, uint32_t node)
 {
 	return handle->per_node[node].refcnt;
 }

+ 1 - 1
src/datawizard/data_request.c

@@ -201,7 +201,7 @@ void _starpu_data_request_append_callback(starpu_data_request_t r, void (*callba
 
 	if (callback_func)
 	{
-		struct callback_list *link = malloc(sizeof(struct callback_list));
+		struct callback_list *link = (struct callback_list *) malloc(sizeof(struct callback_list));
 		STARPU_ASSERT(link);
 
 		link->callback_func = callback_func;

+ 5 - 5
src/datawizard/datastats.c

@@ -25,14 +25,14 @@ static unsigned hit_cnt[STARPU_MAXNODES];
 static unsigned miss_cnt[STARPU_MAXNODES];
 #endif
 
-inline void _starpu_msi_cache_hit(unsigned node __attribute__ ((unused)))
+void _starpu_msi_cache_hit(unsigned node __attribute__ ((unused)))
 {
 #ifdef STARPU_DATA_STATS
 	hit_cnt[node]++;
 #endif
 }
 
-inline void _starpu_msi_cache_miss(unsigned node __attribute__ ((unused)))
+void _starpu_msi_cache_miss(unsigned node __attribute__ ((unused)))
 {
 #ifdef STARPU_DATA_STATS
 	miss_cnt[node]++;
@@ -75,14 +75,14 @@ static unsigned alloc_cnt[STARPU_MAXNODES];
 static unsigned alloc_cache_hit_cnt[STARPU_MAXNODES];
 #endif
 
-inline void _starpu_allocation_cache_hit(unsigned node __attribute__ ((unused)))
+void _starpu_allocation_cache_hit(unsigned node __attribute__ ((unused)))
 {
 #ifdef STARPU_DATA_STATS
 	alloc_cache_hit_cnt[node]++;
 #endif
 }
 
-inline void _starpu_data_allocation_inc_stats(unsigned node __attribute__ ((unused)))
+void _starpu_data_allocation_inc_stats(unsigned node __attribute__ ((unused)))
 {
 #ifdef STARPU_DATA_STATS
 	alloc_cnt[node]++;
@@ -139,7 +139,7 @@ void _starpu_display_comm_amounts(void)
 
 #else
 
-inline void _starpu_display_comm_amounts(void)
+void _starpu_display_comm_amounts(void)
 {
 }
 

+ 1 - 1
src/datawizard/filters.c

@@ -342,7 +342,7 @@ void starpu_data_unpartition(starpu_data_handle root_handle, uint32_t gathering_
 /* each child may have his own interface type */
 static void starpu_data_create_children(starpu_data_handle handle, unsigned nchildren, struct starpu_data_filter *f)
 {
-	handle->children = calloc(nchildren, sizeof(struct starpu_data_state_t));
+	handle->children = (struct starpu_data_state_t *) calloc(nchildren, sizeof(struct starpu_data_state_t));
 	STARPU_ASSERT(handle->children);
 
 	unsigned node;

+ 1 - 1
src/datawizard/footprint.c

@@ -43,7 +43,7 @@ uint32_t _starpu_compute_buffers_footprint(starpu_job_t j)
 	return footprint;
 }
 
-inline uint32_t _starpu_compute_data_footprint(starpu_data_handle handle)
+uint32_t _starpu_compute_data_footprint(starpu_data_handle handle)
 {
 	uint32_t interfaceid = (uint32_t)starpu_get_handle_interface_id(handle);
 

+ 2 - 2
src/datawizard/interfaces/bcsr_filters.c

@@ -22,9 +22,9 @@
 
 void starpu_canonical_block_filter_bcsr(void *father_interface, void *child_interface, STARPU_ATTRIBUTE_UNUSED struct starpu_data_filter *f, unsigned id, STARPU_ATTRIBUTE_UNUSED unsigned nparts)
 {
-	struct starpu_bcsr_interface_s *bcsr_father = father_interface;
+	struct starpu_bcsr_interface_s *bcsr_father = (struct starpu_bcsr_interface_s *) father_interface;
 	/* each chunk becomes a small dense matrix */
-	starpu_matrix_interface_t *matrix_child = child_interface;
+	starpu_matrix_interface_t *matrix_child = (starpu_matrix_interface_t *) child_interface;
 	
 	size_t elemsize = bcsr_father->elemsize;
 	uint32_t firstentry = bcsr_father->firstentry;

+ 19 - 19
src/datawizard/interfaces/bcsr_interface.c

@@ -82,12 +82,12 @@ static struct starpu_data_interface_ops_t interface_bcsr_ops = {
 
 static void register_bcsr_handle(starpu_data_handle handle, uint32_t home_node, void *data_interface)
 {
-	starpu_bcsr_interface_t *bcsr_interface = data_interface;
+	starpu_bcsr_interface_t *bcsr_interface = (starpu_bcsr_interface_t *) data_interface;
 
 	unsigned node;
 	for (node = 0; node < STARPU_MAXNODES; node++)
 	{
-		starpu_bcsr_interface_t *local_interface =
+		starpu_bcsr_interface_t *local_interface = (starpu_bcsr_interface_t *)
 			starpu_data_get_interface_on_node(handle, node);
 
 		if (node == home_node) {
@@ -143,8 +143,8 @@ static uint32_t footprint_bcsr_interface_crc32(starpu_data_handle handle)
 
 static int bcsr_compare(void *data_interface_a, void *data_interface_b)
 {
-	starpu_bcsr_interface_t *bcsr_a = data_interface_a;
-	starpu_bcsr_interface_t *bcsr_b = data_interface_b;
+	starpu_bcsr_interface_t *bcsr_a = (starpu_bcsr_interface_t *) data_interface_a;
+	starpu_bcsr_interface_t *bcsr_b = (starpu_bcsr_interface_t *) data_interface_b;
 
 	/* Two matricess are considered compatible if they have the same size */
 	return ((bcsr_a->nnz == bcsr_b->nnz)
@@ -157,7 +157,7 @@ static int bcsr_compare(void *data_interface_a, void *data_interface_b)
 /* offer an access to the data parameters */
 uint32_t starpu_bcsr_get_nnz(starpu_data_handle handle)
 {
-	starpu_bcsr_interface_t *data_interface =
+	starpu_bcsr_interface_t *data_interface = (starpu_bcsr_interface_t *)
 		starpu_data_get_interface_on_node(handle, 0);
 
 	return data_interface->nnz;
@@ -165,7 +165,7 @@ uint32_t starpu_bcsr_get_nnz(starpu_data_handle handle)
 
 uint32_t starpu_bcsr_get_nrow(starpu_data_handle handle)
 {
-	starpu_bcsr_interface_t *data_interface =
+	starpu_bcsr_interface_t *data_interface = (starpu_bcsr_interface_t *)
 		starpu_data_get_interface_on_node(handle, 0);
 
 	return data_interface->nrow;
@@ -173,7 +173,7 @@ uint32_t starpu_bcsr_get_nrow(starpu_data_handle handle)
 
 uint32_t starpu_bcsr_get_firstentry(starpu_data_handle handle)
 {
-	starpu_bcsr_interface_t *data_interface =
+	starpu_bcsr_interface_t *data_interface = (starpu_bcsr_interface_t *)
 		starpu_data_get_interface_on_node(handle, 0);
 
 	return data_interface->firstentry;
@@ -181,7 +181,7 @@ uint32_t starpu_bcsr_get_firstentry(starpu_data_handle handle)
 
 uint32_t starpu_bcsr_get_r(starpu_data_handle handle)
 {
-	starpu_bcsr_interface_t *data_interface =
+	starpu_bcsr_interface_t *data_interface = (starpu_bcsr_interface_t *)
 		starpu_data_get_interface_on_node(handle, 0);
 
 	return data_interface->r;
@@ -189,7 +189,7 @@ uint32_t starpu_bcsr_get_r(starpu_data_handle handle)
 
 uint32_t starpu_bcsr_get_c(starpu_data_handle handle)
 {
-	starpu_bcsr_interface_t *data_interface =
+	starpu_bcsr_interface_t *data_interface = (starpu_bcsr_interface_t *)
 		starpu_data_get_interface_on_node(handle, 0);
 
 	return data_interface->c;
@@ -197,7 +197,7 @@ uint32_t starpu_bcsr_get_c(starpu_data_handle handle)
 
 size_t starpu_bcsr_get_elemsize(starpu_data_handle handle)
 {
-	starpu_bcsr_interface_t *data_interface =
+	starpu_bcsr_interface_t *data_interface = (starpu_bcsr_interface_t *)
 		starpu_data_get_interface_on_node(handle, 0);
 
 	return data_interface->elemsize;
@@ -210,7 +210,7 @@ uintptr_t starpu_bcsr_get_local_nzval(starpu_data_handle handle)
 
 	STARPU_ASSERT(starpu_data_test_if_allocated_on_node(handle, node));
 
-	starpu_bcsr_interface_t *data_interface =
+	starpu_bcsr_interface_t *data_interface = (starpu_bcsr_interface_t *)
 		starpu_data_get_interface_on_node(handle, node);
 	
 	return data_interface->nzval;
@@ -219,7 +219,7 @@ uintptr_t starpu_bcsr_get_local_nzval(starpu_data_handle handle)
 uint32_t *starpu_bcsr_get_local_colind(starpu_data_handle handle)
 {
 	/* XXX 0 */
-	starpu_bcsr_interface_t *data_interface =
+	starpu_bcsr_interface_t *data_interface = (starpu_bcsr_interface_t *)
 		starpu_data_get_interface_on_node(handle, 0);
 
 	return data_interface->colind;
@@ -228,7 +228,7 @@ uint32_t *starpu_bcsr_get_local_colind(starpu_data_handle handle)
 uint32_t *starpu_bcsr_get_local_rowptr(starpu_data_handle handle)
 {
 	/* XXX 0 */
-	starpu_bcsr_interface_t *data_interface =
+	starpu_bcsr_interface_t *data_interface = (starpu_bcsr_interface_t *)
 		starpu_data_get_interface_on_node(handle, 0);
 
 	return data_interface->rowptr;
@@ -261,7 +261,7 @@ static ssize_t allocate_bcsr_buffer_on_node(void *data_interface_, uint32_t dst_
 	ssize_t allocated_memory;
 
 	/* we need the 3 arrays to be allocated */
-	starpu_bcsr_interface_t *bcsr_interface = data_interface_;
+	starpu_bcsr_interface_t *bcsr_interface = (starpu_bcsr_interface_t *) data_interface_;
 
 	uint32_t nnz = bcsr_interface->nnz;
 	uint32_t nrow = bcsr_interface->nrow;
@@ -278,11 +278,11 @@ static ssize_t allocate_bcsr_buffer_on_node(void *data_interface_, uint32_t dst_
 			if (!addr_nzval)
 				goto fail_nzval;
 
-			addr_colind = malloc(nnz*sizeof(uint32_t));
+			addr_colind = (uint32_t *) malloc(nnz*sizeof(uint32_t));
 			if (!addr_colind)
 				goto fail_colind;
 
-			addr_rowptr = malloc((nrow+1)*sizeof(uint32_t));
+			addr_rowptr = (uint32_t *) malloc((nrow+1)*sizeof(uint32_t));
 			if (!addr_rowptr)
 				goto fail_rowptr;
 
@@ -383,7 +383,7 @@ fail_nzval:
 
 static void free_bcsr_buffer_on_node(void *data_interface, uint32_t node)
 {
-	starpu_bcsr_interface_t *bcsr_interface = data_interface;
+	starpu_bcsr_interface_t *bcsr_interface = (starpu_bcsr_interface_t *) data_interface;
 
 	starpu_node_kind kind = _starpu_get_node_kind(node);
 	switch(kind) {
@@ -526,8 +526,8 @@ static int copy_ram_to_opencl(void *src_interface, unsigned src_node STARPU_ATTR
 /* as not all platform easily have a BLAS lib installed ... */
 static int copy_ram_to_ram(void *src_interface, unsigned src_node STARPU_ATTRIBUTE_UNUSED, void *dst_interface, unsigned dst_node STARPU_ATTRIBUTE_UNUSED)
 {
-	starpu_bcsr_interface_t *src_bcsr = src_interface;
-	starpu_bcsr_interface_t *dst_bcsr = dst_interface;
+	starpu_bcsr_interface_t *src_bcsr = (starpu_bcsr_interface_t *) src_interface;
+	starpu_bcsr_interface_t *dst_bcsr = (starpu_bcsr_interface_t *) dst_interface;
 
 	uint32_t nnz = src_bcsr->nnz;
 	uint32_t nrow = src_bcsr->nrow;

+ 2 - 2
src/datawizard/interfaces/block_filters.c

@@ -21,8 +21,8 @@
 void starpu_block_filter_func_block(void *father_interface, void *child_interface, STARPU_ATTRIBUTE_UNUSED struct starpu_data_filter *f,
                                     unsigned id, unsigned nparts)
 {
-        starpu_block_interface_t *block_father = father_interface;
-        starpu_block_interface_t *block_child = child_interface;
+        starpu_block_interface_t *block_father = (starpu_block_interface_t *) father_interface;
+        starpu_block_interface_t *block_child = (starpu_block_interface_t *) child_interface;
 
 	uint32_t nx = block_father->nx;
         uint32_t ny = block_father->ny;

+ 18 - 18
src/datawizard/interfaces/block_interface.c

@@ -108,7 +108,7 @@ static void *block_handle_to_pointer(starpu_data_handle handle, uint32_t node)
 {
 	STARPU_ASSERT(starpu_data_test_if_allocated_on_node(handle, node));
 
-	starpu_block_interface_t *block_interface =
+	starpu_block_interface_t *block_interface = (starpu_block_interface_t *)
 		starpu_data_get_interface_on_node(handle, node);
 
 	return (void*) block_interface->ptr;
@@ -116,12 +116,12 @@ static void *block_handle_to_pointer(starpu_data_handle handle, uint32_t node)
 
 static void register_block_handle(starpu_data_handle handle, uint32_t home_node, void *data_interface)
 {
-	starpu_block_interface_t *block_interface = data_interface;
+	starpu_block_interface_t *block_interface = (starpu_block_interface_t *) data_interface;
 
 	unsigned node;
 	for (node = 0; node < STARPU_MAXNODES; node++)
 	{
-		starpu_block_interface_t *local_interface =
+		starpu_block_interface_t *local_interface = (starpu_block_interface_t *)
 			starpu_data_get_interface_on_node(handle, node);
 
 		if (node == home_node) {
@@ -179,8 +179,8 @@ static uint32_t footprint_block_interface_crc32(starpu_data_handle handle)
 
 static int block_compare(void *data_interface_a, void *data_interface_b)
 {
-	starpu_block_interface_t *block_a = data_interface_a;
-	starpu_block_interface_t *block_b = data_interface_b;
+	starpu_block_interface_t *block_a = (starpu_block_interface_t *) data_interface_a;
+	starpu_block_interface_t *block_b = (starpu_block_interface_t *) data_interface_b;
 
 	/* Two matricess are considered compatible if they have the same size */
 	return ((block_a->nx == block_b->nx)
@@ -193,7 +193,7 @@ static void display_block_interface(starpu_data_handle handle, FILE *f)
 {
 	starpu_block_interface_t *block_interface;
 
-	block_interface = starpu_data_get_interface_on_node(handle, 0);
+	block_interface = (starpu_block_interface_t *) starpu_data_get_interface_on_node(handle, 0);
 
 	fprintf(f, "%u\t%u\t%u\t", block_interface->nx, block_interface->ny, block_interface->nz);
 }
@@ -203,7 +203,7 @@ static size_t block_interface_get_size(starpu_data_handle handle)
 	size_t size;
 	starpu_block_interface_t *block_interface;
 
-	block_interface = starpu_data_get_interface_on_node(handle, 0);
+	block_interface = (starpu_block_interface_t *) starpu_data_get_interface_on_node(handle, 0);
 
 	size = block_interface->nx*block_interface->ny*block_interface->nz*block_interface->elemsize; 
 
@@ -213,7 +213,7 @@ static size_t block_interface_get_size(starpu_data_handle handle)
 /* offer an access to the data parameters */
 uint32_t starpu_block_get_nx(starpu_data_handle handle)
 {
-	starpu_block_interface_t *block_interface =
+	starpu_block_interface_t *block_interface = (starpu_block_interface_t *)
 		starpu_data_get_interface_on_node(handle, 0);
 
 	return block_interface->nx;
@@ -221,7 +221,7 @@ uint32_t starpu_block_get_nx(starpu_data_handle handle)
 
 uint32_t starpu_block_get_ny(starpu_data_handle handle)
 {
-	starpu_block_interface_t *block_interface =
+	starpu_block_interface_t *block_interface = (starpu_block_interface_t *)
 		starpu_data_get_interface_on_node(handle, 0);
 
 	return block_interface->ny;
@@ -229,7 +229,7 @@ uint32_t starpu_block_get_ny(starpu_data_handle handle)
 
 uint32_t starpu_block_get_nz(starpu_data_handle handle)
 {
-	starpu_block_interface_t *block_interface =
+	starpu_block_interface_t *block_interface = (starpu_block_interface_t *)
 		starpu_data_get_interface_on_node(handle, 0);
 
 	return block_interface->nz;
@@ -242,7 +242,7 @@ uint32_t starpu_block_get_local_ldy(starpu_data_handle handle)
 
 	STARPU_ASSERT(starpu_data_test_if_allocated_on_node(handle, node));
 	
-	starpu_block_interface_t *block_interface =
+	starpu_block_interface_t *block_interface = (starpu_block_interface_t *)
 		starpu_data_get_interface_on_node(handle, node);
 
 	return block_interface->ldy;
@@ -255,7 +255,7 @@ uint32_t starpu_block_get_local_ldz(starpu_data_handle handle)
 
 	STARPU_ASSERT(starpu_data_test_if_allocated_on_node(handle, node));
 
-	starpu_block_interface_t *block_interface =
+	starpu_block_interface_t *block_interface = (starpu_block_interface_t *)
 		starpu_data_get_interface_on_node(handle, node);
 
 	return block_interface->ldz;
@@ -268,7 +268,7 @@ uintptr_t starpu_block_get_local_ptr(starpu_data_handle handle)
 
 	STARPU_ASSERT(starpu_data_test_if_allocated_on_node(handle, node));
 
-	starpu_block_interface_t *block_interface =
+	starpu_block_interface_t *block_interface = (starpu_block_interface_t *)
 		starpu_data_get_interface_on_node(handle, node);
 
 	return block_interface->ptr;
@@ -276,7 +276,7 @@ uintptr_t starpu_block_get_local_ptr(starpu_data_handle handle)
 
 size_t starpu_block_get_elemsize(starpu_data_handle handle)
 {
-	starpu_block_interface_t *block_interface =
+	starpu_block_interface_t *block_interface = (starpu_block_interface_t *)
 		starpu_data_get_interface_on_node(handle, 0);
 
 	return block_interface->elemsize;
@@ -295,7 +295,7 @@ static ssize_t allocate_block_buffer_on_node(void *data_interface_, uint32_t dst
 #ifdef STARPU_USE_CUDA
 	cudaError_t status;
 #endif
-	starpu_block_interface_t *dst_block = data_interface_;
+	starpu_block_interface_t *dst_block = (starpu_block_interface_t *) data_interface_;
 
 	uint32_t nx = dst_block->nx;
 	uint32_t ny = dst_block->ny;
@@ -364,7 +364,7 @@ static ssize_t allocate_block_buffer_on_node(void *data_interface_, uint32_t dst
 
 static void free_block_buffer_on_node(void *data_interface, uint32_t node)
 {
-	starpu_block_interface_t *block_interface = data_interface;
+	starpu_block_interface_t *block_interface = (starpu_block_interface_t *) data_interface;
 
 #ifdef STARPU_USE_CUDA
 	cudaError_t status;
@@ -722,8 +722,8 @@ static int copy_opencl_to_ram(void *src_interface, unsigned src_node STARPU_ATTR
 /* as not all platform easily have a BLAS lib installed ... */
 static int copy_ram_to_ram(void *src_interface, unsigned src_node STARPU_ATTRIBUTE_UNUSED, void *dst_interface, unsigned dst_node STARPU_ATTRIBUTE_UNUSED)
 {
-	starpu_block_interface_t *src_block = src_interface;
-	starpu_block_interface_t *dst_block = dst_interface;
+	starpu_block_interface_t *src_block = (starpu_block_interface_t *) src_interface;
+	starpu_block_interface_t *dst_block = (starpu_block_interface_t *) dst_interface;
 
 	uint32_t nx = dst_block->nx;
 	uint32_t ny = dst_block->ny;

+ 2 - 2
src/datawizard/interfaces/csr_filters.c

@@ -22,8 +22,8 @@
 
 void starpu_vertical_block_filter_func_csr(void *father_interface, void *child_interface, STARPU_ATTRIBUTE_UNUSED struct starpu_data_filter *f, unsigned id, unsigned nchunks)
 {
-	starpu_csr_interface_t *csr_father = father_interface;
-	starpu_csr_interface_t *csr_child = child_interface;
+	starpu_csr_interface_t *csr_father = (starpu_csr_interface_t *) father_interface;
+	starpu_csr_interface_t *csr_child = (starpu_csr_interface_t *) child_interface;
 
 	uint32_t nrow = csr_father->nrow;
 	size_t elemsize = csr_father->elemsize;

+ 17 - 17
src/datawizard/interfaces/csr_interface.c

@@ -84,12 +84,12 @@ static struct starpu_data_interface_ops_t interface_csr_ops = {
 
 static void register_csr_handle(starpu_data_handle handle, uint32_t home_node, void *data_interface)
 {
-	starpu_csr_interface_t *csr_interface = data_interface;
+	starpu_csr_interface_t *csr_interface = (starpu_csr_interface_t *) data_interface;
 
 	unsigned node;
 	for (node = 0; node < STARPU_MAXNODES; node++)
 	{
-		starpu_csr_interface_t *local_interface =
+		starpu_csr_interface_t *local_interface = (starpu_csr_interface_t *)
 			starpu_data_get_interface_on_node(handle, node);
 
 		if (node == home_node) {
@@ -134,8 +134,8 @@ static uint32_t footprint_csr_interface_crc32(starpu_data_handle handle)
 
 static int csr_compare(void *data_interface_a, void *data_interface_b)
 {
-	starpu_csr_interface_t *csr_a = data_interface_a;
-	starpu_csr_interface_t *csr_b = data_interface_b;
+	starpu_csr_interface_t *csr_a = (starpu_csr_interface_t *) data_interface_a;
+	starpu_csr_interface_t *csr_b = (starpu_csr_interface_t *) data_interface_b;
 
 	/* Two matricess are considered compatible if they have the same size */
 	return ((csr_a->nnz == csr_b->nnz)
@@ -146,7 +146,7 @@ static int csr_compare(void *data_interface_a, void *data_interface_b)
 /* offer an access to the data parameters */
 uint32_t starpu_csr_get_nnz(starpu_data_handle handle)
 {
-	starpu_csr_interface_t *csr_interface =
+	starpu_csr_interface_t *csr_interface = (starpu_csr_interface_t *)
 		starpu_data_get_interface_on_node(handle, 0);
 
 	return csr_interface->nnz;
@@ -154,7 +154,7 @@ uint32_t starpu_csr_get_nnz(starpu_data_handle handle)
 
 uint32_t starpu_csr_get_nrow(starpu_data_handle handle)
 {
-	starpu_csr_interface_t *csr_interface =
+	starpu_csr_interface_t *csr_interface = (starpu_csr_interface_t *)
 		starpu_data_get_interface_on_node(handle, 0);
 
 	return csr_interface->nrow;
@@ -162,7 +162,7 @@ uint32_t starpu_csr_get_nrow(starpu_data_handle handle)
 
 uint32_t starpu_csr_get_firstentry(starpu_data_handle handle)
 {
-	starpu_csr_interface_t *csr_interface =
+	starpu_csr_interface_t *csr_interface = (starpu_csr_interface_t *)
 		starpu_data_get_interface_on_node(handle, 0);
 
 	return csr_interface->firstentry;
@@ -170,7 +170,7 @@ uint32_t starpu_csr_get_firstentry(starpu_data_handle handle)
 
 size_t starpu_csr_get_elemsize(starpu_data_handle handle)
 {
-	starpu_csr_interface_t *csr_interface =
+	starpu_csr_interface_t *csr_interface = (starpu_csr_interface_t *)
 		starpu_data_get_interface_on_node(handle, 0);
 
 	return csr_interface->elemsize;
@@ -183,7 +183,7 @@ uintptr_t starpu_csr_get_local_nzval(starpu_data_handle handle)
 
 	STARPU_ASSERT(starpu_data_test_if_allocated_on_node(handle, node));
 
-	starpu_csr_interface_t *csr_interface =
+	starpu_csr_interface_t *csr_interface = (starpu_csr_interface_t *)
 		starpu_data_get_interface_on_node(handle, node);
 
 	return csr_interface->nzval;
@@ -196,7 +196,7 @@ uint32_t *starpu_csr_get_local_colind(starpu_data_handle handle)
 
 	STARPU_ASSERT(starpu_data_test_if_allocated_on_node(handle, node));
 
-	starpu_csr_interface_t *csr_interface =
+	starpu_csr_interface_t *csr_interface = (starpu_csr_interface_t *)
 		starpu_data_get_interface_on_node(handle, node);
 
 	return csr_interface->colind;
@@ -209,7 +209,7 @@ uint32_t *starpu_csr_get_local_rowptr(starpu_data_handle handle)
 
 	STARPU_ASSERT(starpu_data_test_if_allocated_on_node(handle, node));
 
-	starpu_csr_interface_t *csr_interface =
+	starpu_csr_interface_t *csr_interface = (starpu_csr_interface_t *)
 		starpu_data_get_interface_on_node(handle, node);
 
 	return csr_interface->rowptr;
@@ -238,7 +238,7 @@ static ssize_t allocate_csr_buffer_on_node(void *data_interface_, uint32_t dst_n
 	ssize_t allocated_memory;
 
 	/* we need the 3 arrays to be allocated */
-	starpu_csr_interface_t *csr_interface = data_interface_;
+	starpu_csr_interface_t *csr_interface = (starpu_csr_interface_t *) data_interface_;
 
 	uint32_t nnz = csr_interface->nnz;
 	uint32_t nrow = csr_interface->nrow;
@@ -252,11 +252,11 @@ static ssize_t allocate_csr_buffer_on_node(void *data_interface_, uint32_t dst_n
 			if (!addr_nzval)
 				goto fail_nzval;
 
-			addr_colind = malloc(nnz*sizeof(uint32_t));
+			addr_colind = (uint32_t *) malloc(nnz*sizeof(uint32_t));
 			if (!addr_colind)
 				goto fail_colind;
 
-			addr_rowptr = malloc((nrow+1)*sizeof(uint32_t));
+			addr_rowptr = (uint32_t *) malloc((nrow+1)*sizeof(uint32_t));
 			if (!addr_rowptr)
 				goto fail_rowptr;
 
@@ -357,7 +357,7 @@ fail_nzval:
 
 static void free_csr_buffer_on_node(void *data_interface, uint32_t node)
 {
-	starpu_csr_interface_t *csr_interface = data_interface;
+	starpu_csr_interface_t *csr_interface = (starpu_csr_interface_t *) data_interface;
 
 	starpu_node_kind kind = _starpu_get_node_kind(node);
 	switch(kind) {
@@ -675,8 +675,8 @@ static int copy_ram_to_opencl(void *src_interface, unsigned src_node STARPU_ATTR
 /* as not all platform easily have a BLAS lib installed ... */
 static int copy_ram_to_ram(void *src_interface, unsigned src_node STARPU_ATTRIBUTE_UNUSED, void *dst_interface, unsigned dst_node STARPU_ATTRIBUTE_UNUSED)
 {
-	starpu_csr_interface_t *src_csr = src_interface;
-	starpu_csr_interface_t *dst_csr = dst_interface;
+	starpu_csr_interface_t *src_csr = (starpu_csr_interface_t *) src_interface;
+	starpu_csr_interface_t *dst_csr = (starpu_csr_interface_t *) dst_interface;
 
 	uint32_t nnz = src_csr->nnz;
 	uint32_t nrow = src_csr->nrow;

+ 3 - 3
src/datawizard/interfaces/data_interface.c

@@ -59,7 +59,7 @@ void _starpu_data_register_ram_pointer(starpu_data_handle handle, void *ptr)
 {
 	struct handle_entry *entry;
 
-	entry = malloc(sizeof(*entry));
+	entry = (struct handle_entry *) malloc(sizeof(*entry));
 	STARPU_ASSERT(entry != NULL);
 
 	entry->pointer = ptr;
@@ -214,7 +214,7 @@ static void _starpu_register_new_data(starpu_data_handle handle,
 
 static starpu_data_handle _starpu_data_handle_allocate(struct starpu_data_interface_ops_t *interface_ops)
 {
-	starpu_data_handle handle =
+	starpu_data_handle handle = (starpu_data_handle)
 		calloc(1, sizeof(struct starpu_data_state_t));
 
 	STARPU_ASSERT(handle);
@@ -359,7 +359,7 @@ struct unregister_callback_arg {
 static void _starpu_data_unregister_fetch_data_callback(void *_arg)
 {
 	int ret;
-	struct unregister_callback_arg *arg = _arg;
+	struct unregister_callback_arg *arg = (struct unregister_callback_arg *) _arg;
 
 	starpu_data_handle handle = arg->handle;
 

+ 4 - 4
src/datawizard/interfaces/matrix_filters.c

@@ -25,8 +25,8 @@
  */
 void starpu_block_filter_func(void *father_interface, void *child_interface, STARPU_ATTRIBUTE_UNUSED struct starpu_data_filter *f, unsigned id, unsigned nchunks)
 {
-       starpu_matrix_interface_t *matrix_father = father_interface;
-       starpu_matrix_interface_t *matrix_child = child_interface;
+       starpu_matrix_interface_t *matrix_father = (starpu_matrix_interface_t *) father_interface;
+       starpu_matrix_interface_t *matrix_child = (starpu_matrix_interface_t *) child_interface;
   
 	uint32_t nx = matrix_father->nx;
 	uint32_t ny = matrix_father->ny;
@@ -56,8 +56,8 @@ void starpu_block_filter_func(void *father_interface, void *child_interface, STA
 
 void starpu_vertical_block_filter_func(void *father_interface, void *child_interface, STARPU_ATTRIBUTE_UNUSED struct starpu_data_filter *f, unsigned id, unsigned nchunks)
 {
-        starpu_matrix_interface_t *matrix_father = father_interface;
-        starpu_matrix_interface_t *matrix_child = child_interface;
+        starpu_matrix_interface_t *matrix_father = (starpu_matrix_interface_t *) father_interface;
+        starpu_matrix_interface_t *matrix_child = (starpu_matrix_interface_t *) child_interface;
 
 	uint32_t nx = matrix_father->nx;
 	uint32_t ny = matrix_father->ny;

+ 16 - 16
src/datawizard/interfaces/matrix_interface.c

@@ -113,12 +113,12 @@ static int convert_matrix_to_gordon(void *data_interface, uint64_t *ptr, gordon_
 
 static void register_matrix_handle(starpu_data_handle handle, uint32_t home_node, void *data_interface)
 {
-	starpu_matrix_interface_t *matrix_interface = data_interface;
+	starpu_matrix_interface_t *matrix_interface = (starpu_matrix_interface_t *) data_interface;
 
 	unsigned node;
 	for (node = 0; node < STARPU_MAXNODES; node++)
 	{
-		starpu_matrix_interface_t *local_interface =
+		starpu_matrix_interface_t *local_interface = (starpu_matrix_interface_t *)
 			starpu_data_get_interface_on_node(handle, node);
 
 		if (node == home_node) {
@@ -144,7 +144,7 @@ static void *matrix_handle_to_pointer(starpu_data_handle handle, uint32_t node)
 {
 	STARPU_ASSERT(starpu_data_test_if_allocated_on_node(handle, node));
 
-	starpu_matrix_interface_t *matrix_interface =
+	starpu_matrix_interface_t *matrix_interface = (starpu_matrix_interface_t *)
 		starpu_data_get_interface_on_node(handle, node);
 
 	return (void*) matrix_interface->ptr;
@@ -176,8 +176,8 @@ static uint32_t footprint_matrix_interface_crc32(starpu_data_handle handle)
 
 static int matrix_compare(void *data_interface_a, void *data_interface_b)
 {
-	starpu_matrix_interface_t *matrix_a = data_interface_a;
-	starpu_matrix_interface_t *matrix_b = data_interface_b;
+	starpu_matrix_interface_t *matrix_a = (starpu_matrix_interface_t *) data_interface_a;
+	starpu_matrix_interface_t *matrix_b = (starpu_matrix_interface_t *) data_interface_b;
 
 	/* Two matricess are considered compatible if they have the same size */
 	return ((matrix_a->nx == matrix_b->nx)
@@ -187,7 +187,7 @@ static int matrix_compare(void *data_interface_a, void *data_interface_b)
 
 static void display_matrix_interface(starpu_data_handle handle, FILE *f)
 {
-	starpu_matrix_interface_t *matrix_interface =
+	starpu_matrix_interface_t *matrix_interface = (starpu_matrix_interface_t *)
 		starpu_data_get_interface_on_node(handle, 0);
 
 	fprintf(f, "%u\t%u\t", matrix_interface->nx, matrix_interface->ny);
@@ -195,7 +195,7 @@ static void display_matrix_interface(starpu_data_handle handle, FILE *f)
 
 static size_t matrix_interface_get_size(starpu_data_handle handle)
 {
-	starpu_matrix_interface_t *matrix_interface =
+	starpu_matrix_interface_t *matrix_interface = (starpu_matrix_interface_t *)
 		starpu_data_get_interface_on_node(handle, 0);
 
 	size_t size;
@@ -207,7 +207,7 @@ static size_t matrix_interface_get_size(starpu_data_handle handle)
 /* offer an access to the data parameters */
 uint32_t starpu_matrix_get_nx(starpu_data_handle handle)
 {
-	starpu_matrix_interface_t *matrix_interface =
+	starpu_matrix_interface_t *matrix_interface = (starpu_matrix_interface_t *)
 		starpu_data_get_interface_on_node(handle, 0);
 
 	return matrix_interface->nx;
@@ -215,7 +215,7 @@ uint32_t starpu_matrix_get_nx(starpu_data_handle handle)
 
 uint32_t starpu_matrix_get_ny(starpu_data_handle handle)
 {
-	starpu_matrix_interface_t *matrix_interface =
+	starpu_matrix_interface_t *matrix_interface = (starpu_matrix_interface_t *)
 		starpu_data_get_interface_on_node(handle, 0);
 
 	return matrix_interface->ny;
@@ -228,7 +228,7 @@ uint32_t starpu_matrix_get_local_ld(starpu_data_handle handle)
 
 	STARPU_ASSERT(starpu_data_test_if_allocated_on_node(handle, node));
 
-	starpu_matrix_interface_t *matrix_interface =
+	starpu_matrix_interface_t *matrix_interface = (starpu_matrix_interface_t *)
 		starpu_data_get_interface_on_node(handle, node);
 
 	return matrix_interface->ld;
@@ -241,7 +241,7 @@ uintptr_t starpu_matrix_get_local_ptr(starpu_data_handle handle)
 
 	STARPU_ASSERT(starpu_data_test_if_allocated_on_node(handle, node));
 
-	starpu_matrix_interface_t *matrix_interface =
+	starpu_matrix_interface_t *matrix_interface = (starpu_matrix_interface_t *)
 		starpu_data_get_interface_on_node(handle, node);
 
 	return matrix_interface->ptr;
@@ -249,7 +249,7 @@ uintptr_t starpu_matrix_get_local_ptr(starpu_data_handle handle)
 
 size_t starpu_matrix_get_elemsize(starpu_data_handle handle)
 {
-	starpu_matrix_interface_t *matrix_interface =
+	starpu_matrix_interface_t *matrix_interface = (starpu_matrix_interface_t *)
 		starpu_data_get_interface_on_node(handle, 0);
 
 	return matrix_interface->elemsize;
@@ -268,7 +268,7 @@ static ssize_t allocate_matrix_buffer_on_node(void *data_interface_, uint32_t ds
 	cudaError_t status;
 #endif
 
-	starpu_matrix_interface_t *matrix_interface = data_interface_;
+	starpu_matrix_interface_t *matrix_interface = (starpu_matrix_interface_t *) data_interface_;
 
 	uint32_t nx = matrix_interface->nx;
 	uint32_t ny = matrix_interface->ny;
@@ -335,7 +335,7 @@ static ssize_t allocate_matrix_buffer_on_node(void *data_interface_, uint32_t ds
 
 static void free_matrix_buffer_on_node(void *data_interface, uint32_t node)
 {
-	starpu_matrix_interface_t *matrix_interface = data_interface;
+	starpu_matrix_interface_t *matrix_interface = (starpu_matrix_interface_t *) data_interface;
 
 #ifdef STARPU_USE_CUDA
 	cudaError_t status;
@@ -594,8 +594,8 @@ static int copy_opencl_to_ram(void *src_interface, unsigned src_node STARPU_ATTR
 /* as not all platform easily have a  lib installed ... */
 static int copy_ram_to_ram(void *src_interface, unsigned src_node STARPU_ATTRIBUTE_UNUSED, void *dst_interface, unsigned dst_node STARPU_ATTRIBUTE_UNUSED)
 {
-	starpu_matrix_interface_t *src_matrix = src_interface;
-	starpu_matrix_interface_t *dst_matrix = dst_interface;
+	starpu_matrix_interface_t *src_matrix = (starpu_matrix_interface_t *) src_interface;
+	starpu_matrix_interface_t *dst_matrix = (starpu_matrix_interface_t *) dst_interface;
 
 	unsigned y;
 	uint32_t nx = dst_matrix->nx;

+ 8 - 8
src/datawizard/interfaces/variable_interface.c

@@ -107,7 +107,7 @@ static void register_variable_handle(starpu_data_handle handle, uint32_t home_no
 	unsigned node;
 	for (node = 0; node < STARPU_MAXNODES; node++)
 	{
-		starpu_variable_interface_t *local_interface = 
+		starpu_variable_interface_t *local_interface = (starpu_variable_interface_t *)
 			starpu_data_get_interface_on_node(handle, node);
 
 		if (node == home_node) {
@@ -151,8 +151,8 @@ static uint32_t footprint_variable_interface_crc32(starpu_data_handle handle)
 
 static int variable_compare(void *data_interface_a, void *data_interface_b)
 {
-	starpu_variable_interface_t *variable_a = data_interface_a;
-	starpu_variable_interface_t *variable_b = data_interface_b;
+	starpu_variable_interface_t *variable_a = (starpu_variable_interface_t *) data_interface_a;
+	starpu_variable_interface_t *variable_b = (starpu_variable_interface_t *) data_interface_b;
 
 	/* Two variables are considered compatible if they have the same size */
 	return (variable_a->elemsize == variable_b->elemsize);
@@ -160,7 +160,7 @@ static int variable_compare(void *data_interface_a, void *data_interface_b)
 
 static void display_variable_interface(starpu_data_handle handle, FILE *f)
 {
-	starpu_variable_interface_t *variable_interface =
+	starpu_variable_interface_t *variable_interface = (starpu_variable_interface_t *)
 		starpu_data_get_interface_on_node(handle, 0);
 
 	fprintf(f, "%ld\t", (long)variable_interface->elemsize);
@@ -168,7 +168,7 @@ static void display_variable_interface(starpu_data_handle handle, FILE *f)
 
 static size_t variable_interface_get_size(starpu_data_handle handle)
 {
-	starpu_variable_interface_t *variable_interface =
+	starpu_variable_interface_t *variable_interface = (starpu_variable_interface_t *)
 		starpu_data_get_interface_on_node(handle, 0);
 
 	return variable_interface->elemsize;
@@ -194,7 +194,7 @@ size_t starpu_variable_get_elemsize(starpu_data_handle handle)
 /* returns the size of the allocated area */
 static ssize_t allocate_variable_buffer_on_node(void *data_interface_, uint32_t dst_node)
 {
-	starpu_variable_interface_t *variable_interface = data_interface_;
+	starpu_variable_interface_t *variable_interface = (starpu_variable_interface_t *) data_interface_;
 
 	unsigned fail = 0;
 	uintptr_t addr = 0;
@@ -490,8 +490,8 @@ static int copy_opencl_to_opencl(void *src_interface, unsigned src_node STARPU_A
 
 static int copy_ram_to_ram(void *src_interface, unsigned src_node STARPU_ATTRIBUTE_UNUSED, void *dst_interface, unsigned dst_node STARPU_ATTRIBUTE_UNUSED)
 {
-	starpu_variable_interface_t *src_variable = src_interface;
-	starpu_variable_interface_t *dst_variable = dst_interface;
+	starpu_variable_interface_t *src_variable = (starpu_variable_interface_t *) src_interface;
+	starpu_variable_interface_t *dst_variable = (starpu_variable_interface_t *) dst_interface;
 
 	size_t elemsize = dst_variable->elemsize;
 

+ 7 - 7
src/datawizard/interfaces/vector_filters.c

@@ -22,8 +22,8 @@
 
 void starpu_block_filter_func_vector(void *father_interface, void *child_interface, STARPU_ATTRIBUTE_UNUSED struct starpu_data_filter *f, unsigned id, unsigned nchunks)
 {
-        starpu_vector_interface_t *vector_father = father_interface;
-        starpu_vector_interface_t *vector_child = child_interface;
+        starpu_vector_interface_t *vector_father = (starpu_vector_interface_t *) father_interface;
+        starpu_vector_interface_t *vector_child = (starpu_vector_interface_t *) child_interface;
 	
 	uint32_t nx = vector_father->nx;
 	size_t elemsize = vector_father->elemsize;
@@ -52,8 +52,8 @@ void starpu_vector_divide_in_2_filter_func(void *father_interface, void *child_i
         /* there cannot be more than 2 chunks */
         STARPU_ASSERT(id < 2);
 	
-	starpu_vector_interface_t *vector_father = father_interface;
-	starpu_vector_interface_t *vector_child = child_interface;
+	starpu_vector_interface_t *vector_father = (starpu_vector_interface_t *) father_interface;
+	starpu_vector_interface_t *vector_child = (starpu_vector_interface_t *) child_interface;
 
 	uint32_t length_first = f->filter_arg;
 
@@ -90,10 +90,10 @@ void starpu_vector_divide_in_2_filter_func(void *father_interface, void *child_i
 
 void starpu_vector_list_filter_func(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, STARPU_ATTRIBUTE_UNUSED unsigned nchunks)
 {
-        starpu_vector_interface_t *vector_father = father_interface;
-        starpu_vector_interface_t *vector_child = child_interface;
+        starpu_vector_interface_t *vector_father = (starpu_vector_interface_t *) father_interface;
+        starpu_vector_interface_t *vector_child = (starpu_vector_interface_t *) child_interface;
 
-        uint32_t *length_tab = f->filter_arg_ptr;
+        uint32_t *length_tab = (uint32_t *) f->filter_arg_ptr;
 
 	size_t elemsize = vector_father->elemsize;
 

+ 14 - 14
src/datawizard/interfaces/vector_interface.c

@@ -99,7 +99,7 @@ static void *vector_handle_to_pointer(starpu_data_handle handle, uint32_t node)
 {
 	STARPU_ASSERT(starpu_data_test_if_allocated_on_node(handle, node));
 
-	starpu_vector_interface_t *vector_interface =
+	starpu_vector_interface_t *vector_interface = (starpu_vector_interface_t *)
 		starpu_data_get_interface_on_node(handle, node);
 
 	return (void*) vector_interface->ptr;
@@ -107,12 +107,12 @@ static void *vector_handle_to_pointer(starpu_data_handle handle, uint32_t node)
 
 static void register_vector_handle(starpu_data_handle handle, uint32_t home_node, void *data_interface)
 {
-	starpu_vector_interface_t *vector_interface = data_interface;
+	starpu_vector_interface_t *vector_interface = (starpu_vector_interface_t *) data_interface;
 
 	unsigned node;
 	for (node = 0; node < STARPU_MAXNODES; node++)
 	{
-		starpu_vector_interface_t *local_interface = 
+		starpu_vector_interface_t *local_interface = (starpu_vector_interface_t *)
 			starpu_data_get_interface_on_node(handle, node);
 
 		if (node == home_node) {
@@ -166,8 +166,8 @@ static uint32_t footprint_vector_interface_crc32(starpu_data_handle handle)
 
 static int vector_compare(void *data_interface_a, void *data_interface_b)
 {
-	starpu_vector_interface_t *vector_a = data_interface_a;
-	starpu_vector_interface_t *vector_b = data_interface_b;
+	starpu_vector_interface_t *vector_a = (starpu_vector_interface_t *) data_interface_a;
+	starpu_vector_interface_t *vector_b = (starpu_vector_interface_t *) data_interface_b;
 
 	/* Two vectors are considered compatible if they have the same size */
 	return ((vector_a->nx == vector_b->nx)
@@ -176,7 +176,7 @@ static int vector_compare(void *data_interface_a, void *data_interface_b)
 
 static void display_vector_interface(starpu_data_handle handle, FILE *f)
 {
-	starpu_vector_interface_t *vector_interface =
+	starpu_vector_interface_t *vector_interface = (starpu_vector_interface_t *)
 		starpu_data_get_interface_on_node(handle, 0);
 
 	fprintf(f, "%u\t", vector_interface->nx);
@@ -185,7 +185,7 @@ static void display_vector_interface(starpu_data_handle handle, FILE *f)
 static size_t vector_interface_get_size(starpu_data_handle handle)
 {
 	size_t size;
-	starpu_vector_interface_t *vector_interface =
+	starpu_vector_interface_t *vector_interface = (starpu_vector_interface_t *)
 		starpu_data_get_interface_on_node(handle, 0);
 
 	size = vector_interface->nx*vector_interface->elemsize;
@@ -196,7 +196,7 @@ static size_t vector_interface_get_size(starpu_data_handle handle)
 /* offer an access to the data parameters */
 uint32_t starpu_vector_get_nx(starpu_data_handle handle)
 {
-	starpu_vector_interface_t *vector_interface =
+	starpu_vector_interface_t *vector_interface = (starpu_vector_interface_t *)
 		starpu_data_get_interface_on_node(handle, 0);
 
 	return vector_interface->nx;
@@ -209,7 +209,7 @@ uintptr_t starpu_vector_get_local_ptr(starpu_data_handle handle)
 
 	STARPU_ASSERT(starpu_data_test_if_allocated_on_node(handle, node));
 
-	starpu_vector_interface_t *vector_interface =
+	starpu_vector_interface_t *vector_interface = (starpu_vector_interface_t *)
 		starpu_data_get_interface_on_node(handle, node);
 
 	return vector_interface->ptr;
@@ -217,7 +217,7 @@ uintptr_t starpu_vector_get_local_ptr(starpu_data_handle handle)
 
 size_t starpu_vector_get_elemsize(starpu_data_handle handle)
 {
-	starpu_vector_interface_t *vector_interface =
+	starpu_vector_interface_t *vector_interface = (starpu_vector_interface_t *)
 		starpu_data_get_interface_on_node(handle, 0);
 
 	return vector_interface->elemsize;
@@ -228,7 +228,7 @@ size_t starpu_vector_get_elemsize(starpu_data_handle handle)
 /* returns the size of the allocated area */
 static ssize_t allocate_vector_buffer_on_node(void *data_interface_, uint32_t dst_node)
 {
-	starpu_vector_interface_t *vector_interface = data_interface_;
+	starpu_vector_interface_t *vector_interface = (starpu_vector_interface_t *) data_interface_;
 
 	unsigned fail = 0;
 	uintptr_t addr = 0;
@@ -294,7 +294,7 @@ static ssize_t allocate_vector_buffer_on_node(void *data_interface_, uint32_t ds
 
 static void free_vector_buffer_on_node(void *data_interface, uint32_t node)
 {
-	starpu_vector_interface_t *vector_interface = data_interface;
+	starpu_vector_interface_t *vector_interface = (starpu_vector_interface_t *) data_interface;
 
 #ifdef STARPU_USE_CUDA
 	cudaError_t cures;
@@ -536,8 +536,8 @@ static int copy_opencl_to_opencl(void *src_interface, unsigned src_node STARPU_A
 static int copy_ram_to_ram(void *src_interface, unsigned src_node STARPU_ATTRIBUTE_UNUSED,
 					void *dst_interface, unsigned dst_node STARPU_ATTRIBUTE_UNUSED)
 {
-	starpu_vector_interface_t *src_vector = src_interface;
-	starpu_vector_interface_t *dst_vector = dst_interface;
+	starpu_vector_interface_t *src_vector = (starpu_vector_interface_t *) src_interface;
+	starpu_vector_interface_t *dst_vector = (starpu_vector_interface_t *) dst_interface;
 
 	uint32_t nx = dst_vector->nx;
 	size_t elemsize = dst_vector->elemsize;

+ 3 - 3
src/datawizard/memory_nodes.c

@@ -61,7 +61,7 @@ void _starpu_set_local_memory_node_key(unsigned *node)
 unsigned _starpu_get_local_memory_node(void)
 {
 	unsigned *memory_node;
-	memory_node = pthread_getspecific(memory_node_key);
+	memory_node = (unsigned *) pthread_getspecific(memory_node_key);
 	
 	/* in case this is called by the programmer, we assume the RAM node 
 	   is the appropriate memory node ... so we return 0 XXX */
@@ -71,12 +71,12 @@ unsigned _starpu_get_local_memory_node(void)
 	return *memory_node;
 }
 
-inline starpu_mem_node_descr *_starpu_get_memory_node_description(void)
+starpu_mem_node_descr *_starpu_get_memory_node_description(void)
 {
 	return &descr;
 }
 
-inline starpu_node_kind _starpu_get_node_kind(uint32_t node)
+starpu_node_kind _starpu_get_node_kind(uint32_t node)
 {
 	return descr.nodes[node];
 }

+ 2 - 2
src/datawizard/sort_data_handles.c

@@ -88,8 +88,8 @@ static int _starpu_compar_handles(struct starpu_data_state_t *dataA,
 
 static int _starpu_compar_buffer_descr(const void *_descrA, const void *_descrB)
 {
-	const starpu_buffer_descr *descrA = _descrA;
-	const starpu_buffer_descr *descrB = _descrB;
+	const starpu_buffer_descr *descrA = (const starpu_buffer_descr *) _descrA;
+	const starpu_buffer_descr *descrB = (const starpu_buffer_descr *) _descrB;
 
 	return _starpu_compar_handles(descrA->handle, descrB->handle);
 }

+ 6 - 6
src/datawizard/user_interactions.c

@@ -62,7 +62,7 @@ struct user_interaction_wrapper {
 /* put the current value of the data into RAM */
 static void _starpu_data_acquire_fetch_data_callback(void *arg)
 {
-	struct user_interaction_wrapper *wrapper = arg;
+	struct user_interaction_wrapper *wrapper = (struct user_interaction_wrapper *) arg;
 	starpu_data_handle handle = wrapper->handle;
 
 	/* At that moment, the caller holds a reference to the piece of data.
@@ -79,7 +79,7 @@ static void _starpu_data_acquire_fetch_data_callback(void *arg)
 static void _starpu_data_acquire_continuation_non_blocking(void *arg)
 {
 	int ret;
-	struct user_interaction_wrapper *wrapper = arg;
+	struct user_interaction_wrapper *wrapper = (struct user_interaction_wrapper *) arg;
 
 	starpu_data_handle handle = wrapper->handle;
 
@@ -94,7 +94,7 @@ static void _starpu_data_acquire_continuation_non_blocking(void *arg)
 
 static void starpu_data_acquire_cb_pre_sync_callback(void *arg)
 {
-	struct user_interaction_wrapper *wrapper = arg;
+	struct user_interaction_wrapper *wrapper = (struct user_interaction_wrapper *) arg;
 
 	/* we try to get the data, if we do not succeed immediately, we set a
  	* callback function that will be executed automatically when the data is
@@ -114,7 +114,7 @@ int starpu_data_acquire_cb(starpu_data_handle handle,
 	STARPU_ASSERT(handle);
         _STARPU_LOG_IN();
 
-	struct user_interaction_wrapper *wrapper = malloc(sizeof(struct user_interaction_wrapper));
+	struct user_interaction_wrapper *wrapper = (struct user_interaction_wrapper *) malloc(sizeof(struct user_interaction_wrapper));
 	STARPU_ASSERT(wrapper);
 
 	wrapper->handle = handle;
@@ -173,7 +173,7 @@ int starpu_data_acquire_cb(starpu_data_handle handle,
  */
 static inline void _starpu_data_acquire_continuation(void *arg)
 {
-	struct user_interaction_wrapper *wrapper = arg;
+	struct user_interaction_wrapper *wrapper = (struct user_interaction_wrapper *) arg;
 
 	starpu_data_handle handle = wrapper->handle;
 
@@ -285,7 +285,7 @@ void starpu_data_release(starpu_data_handle handle)
 
 static void _prefetch_data_on_node(void *arg)
 {
-	struct user_interaction_wrapper *wrapper = arg;
+	struct user_interaction_wrapper *wrapper = (struct user_interaction_wrapper *) arg;
 	starpu_data_handle handle = wrapper->handle;
         int ret;
 

+ 1 - 1
src/drivers/cpu/driver_cpu.c

@@ -77,7 +77,7 @@ static int execute_job_on_cpu(starpu_job_t j, struct starpu_worker_s *cpu_args,
 
 void *_starpu_cpu_worker(void *arg)
 {
-	struct starpu_worker_s *cpu_arg = arg;
+	struct starpu_worker_s *cpu_arg = (struct starpu_worker_s *) arg;
 	unsigned memnode = cpu_arg->memory_node;
 	int workerid = cpu_arg->workerid;
 	int devid = cpu_arg->devid;

+ 5 - 5
src/profiling/bound.c

@@ -171,7 +171,7 @@ static void new_task(starpu_job_t j)
 	if (j->bound_task)
 		return;
 
-	t = malloc(sizeof(*t));
+	t = (struct bound_task *) malloc(sizeof(*t));
 	memset(t, 0, sizeof(*t));
 	t->id = j->job_id;
 	t->tag_id = j->task->tag_id;
@@ -216,7 +216,7 @@ void _starpu_bound_record(starpu_job_t j)
 					break;
 
 		if (!tp) {
-			tp = malloc(sizeof(*tp));
+			tp = (struct bound_task_pool *) malloc(sizeof(*tp));
 			tp->cl = j->task->cl;
 			tp->footprint = j->footprint;
 			tp->n = 0;
@@ -245,7 +245,7 @@ void _starpu_bound_tag_dep(starpu_tag_t id, starpu_tag_t dep_id)
 		return;
 	}
 
-	td = malloc(sizeof(*td));
+	td = (struct bound_tag_dep *) malloc(sizeof(*td));
 	td->tag = id;
 	td->dep_tag = dep_id;
 	td->next = tag_deps;
@@ -273,7 +273,7 @@ void _starpu_bound_task_dep(starpu_job_t j, starpu_job_t dep_j)
 	new_task(j);
 	new_task(dep_j);
 	t = j->bound_task;
-	t->deps = realloc(t->deps, ++t->depsn * sizeof(t->deps[0]));
+	t->deps = (struct bound_task **) realloc(t->deps, ++t->depsn * sizeof(t->deps[0]));
 	t->deps[t->depsn-1] = dep_j->bound_task;
 	PTHREAD_MUTEX_UNLOCK(&mutex);
 }
@@ -313,7 +313,7 @@ void _starpu_bound_job_id_dep(starpu_job_t j, unsigned long id)
 		return;
 	}
 	t = j->bound_task;
-	t->deps = realloc(t->deps, ++t->depsn * sizeof(t->deps[0]));
+	t->deps = (struct bound_task **) realloc(t->deps, ++t->depsn * sizeof(t->deps[0]));
 	t->deps[t->depsn-1] = dep_t;
 	PTHREAD_MUTEX_UNLOCK(&mutex);
 }

+ 1 - 1
src/profiling/profiling.c

@@ -121,7 +121,7 @@ struct starpu_task_profiling_info *_starpu_allocate_profiling_info_if_needed(str
 	/* If we are benchmarking, we need room for the power consumption */
 	if (profiling || (task->cl && task->cl->power_model && (task->cl->power_model->benchmarking || _starpu_get_calibrate_flag())))
 	{
-		info = calloc(1, sizeof(struct starpu_task_profiling_info));
+		info = (struct starpu_task_profiling_info *) calloc(1, sizeof(struct starpu_task_profiling_info));
 		STARPU_ASSERT(info);
 	}
 

+ 1 - 1
src/sched_policies/deque_queues.c

@@ -27,7 +27,7 @@
 struct starpu_deque_jobq_s *_starpu_create_deque(void)
 {
 	struct starpu_deque_jobq_s *deque;
-	deque = malloc(sizeof(struct starpu_deque_jobq_s));
+	deque = (struct starpu_deque_jobq_s *) malloc(sizeof(struct starpu_deque_jobq_s));
 
 	/* note that not all mechanisms (eg. the semaphore) have to be used */
 	deque->jobq = starpu_job_list_new();

+ 1 - 1
src/sched_policies/eager_central_priority_policy.c

@@ -56,7 +56,7 @@ static struct starpu_priority_taskq_s *_starpu_create_priority_taskq(void)
 {
 	struct starpu_priority_taskq_s *central_queue;
 	
-	central_queue = malloc(sizeof(struct starpu_priority_taskq_s));
+	central_queue = (struct starpu_priority_taskq_s *) malloc(sizeof(struct starpu_priority_taskq_s));
 	central_queue->total_ntasks = 0;
 
 	unsigned prio;

+ 1 - 1
src/sched_policies/fifo_queues.c

@@ -27,7 +27,7 @@
 struct starpu_fifo_taskq_s *_starpu_create_fifo(void)
 {
 	struct starpu_fifo_taskq_s *fifo;
-	fifo = malloc(sizeof(struct starpu_fifo_taskq_s));
+	fifo = (struct starpu_fifo_taskq_s *) malloc(sizeof(struct starpu_fifo_taskq_s));
 
 	/* note that not all mechanisms (eg. the semaphore) have to be used */
 	starpu_task_list_init(&fifo->taskq);

+ 1 - 1
src/sched_policies/stack_queues.c

@@ -34,7 +34,7 @@ void _starpu_init_stack_queues_mechanisms(void)
 struct starpu_stack_jobq_s *_starpu_create_stack(void)
 {
 	struct starpu_stack_jobq_s *stack;
-	stack = malloc(sizeof(struct starpu_stack_jobq_s));
+	stack = (struct starpu_stack_jobq_s *) malloc(sizeof(struct starpu_stack_jobq_s));
 
 	stack->jobq = starpu_job_list_new();
 	stack->njobs = 0;

+ 33 - 33
src/top/starpu_top.c

@@ -63,7 +63,7 @@ void copy_data_and_param()
 {
 	printf("%s:%d trace\n", __FILE__, __LINE__);
 	//copying datas
-	starputop_datas = malloc(starputop_data_cpt*sizeof(starputop_data*));
+	starputop_datas = (starputop_data **) malloc(starputop_data_cpt*sizeof(starputop_data*));
 	starputop_data* cur = starputop_first_data;
 	unsigned int i = 0;
 	for(i = 0; i < starputop_data_cpt; i++)
@@ -72,7 +72,7 @@ void copy_data_and_param()
 		cur = cur->next;
 	}
 	//copying params
-	starputop_params = malloc(starputop_param_cpt*sizeof(starputop_param*));
+	starputop_params = (starputop_param **) malloc(starputop_param_cpt*sizeof(starputop_param*));
 	starputop_param* cur2 = starputop_first_param;
 	for(i = 0; i < starputop_param_cpt; i++)
 	{
@@ -102,14 +102,14 @@ static void starputop_get_device_type(int id, char* type){
 
 static void starputop_send_devices_info()
 {
-	char* message=malloc(5*sizeof(char));
+	char* message=(char *)malloc(5*sizeof(char));
 	snprintf(message,5,"DEV\n");
 	starputop_message_add(starputop_mt,message);
 
 	unsigned int i;
 	for(i=0;i<starpu_worker_get_count();i++)
 	{
-		message=malloc(sizeof(char)*128);
+		message=(char *)malloc(sizeof(char)*128);
 		char dev_type[10];
 		char dev_name[64];
 		starputop_get_device_type(i,dev_type);
@@ -118,7 +118,7 @@ static void starputop_send_devices_info()
 		starputop_message_add(starputop_mt,message);    
 	}
 
-	message=malloc(6*sizeof(char));                             
+	message=(char*)malloc(6*sizeof(char));                             
 	snprintf(message,6,"/DEV\n");                
 	starputop_message_add(starputop_mt,message);  
 }
@@ -141,22 +141,22 @@ void starputop_init_and_wait(const char* server_name){
 	starputop_communications_threads_launcher();
 
 	//sending server information (report to protocol)
-	char* message = malloc(strlen("SERVERINFO\n")+1);
+	char* message = (char *) malloc(strlen("SERVERINFO\n")+1);
 	sprintf(message, "%s", "SERVERINFO\n");  
 	starputop_message_add(starputop_mt,message);
-	message = malloc(strlen(server_name)+2);
+	message = (char *) malloc(strlen(server_name)+2);
 	sprintf(message, "%s\n", server_name);
 	starputop_message_add(starputop_mt,message);
-	message = malloc(25);
+	message = (char *) malloc(25);
 	sprintf(message, "%lld\n", current_timestamp());
 	starputop_message_add(starputop_mt,message);
-	message = malloc(strlen("/SERVERINFO\n")+1);
+	message = (char *) malloc(strlen("/SERVERINFO\n")+1);
 	sprintf(message,"%s", "/SERVERINFO\n");
 	starputop_message_add(starputop_mt,message);
 
 
 	//sending data list
-	message = malloc(strlen("DATA\n")+1);
+	message = (char *) malloc(strlen("DATA\n")+1);
 	sprintf(message, "%s", "DATA\n");
 	starputop_message_add(starputop_mt,message);
 	starputop_data * cur_data = starputop_first_data;
@@ -165,12 +165,12 @@ void starputop_init_and_wait(const char* server_name){
 		starputop_message_add(starputop_mt,message_for_topdata_init(cur_data));
 		cur_data = cur_data->next;
 	}
-	message = malloc(strlen("/DATA\n")+1);
+	message = (char *) malloc(strlen("/DATA\n")+1);
 	sprintf(message, "%s", "/DATA\n");
 	starputop_message_add(starputop_mt,message);
 	
 	//sending parameter list
-	message = malloc(strlen("PARAMS\n")+1);
+	message = (char *) malloc(strlen("PARAMS\n")+1);
 	sprintf(message, "%s", "PARAMS\n");
 	starputop_message_add(starputop_mt,message);
 	starputop_param * cur_param = starputop_first_param;
@@ -180,7 +180,7 @@ void starputop_init_and_wait(const char* server_name){
 	  cur_param = cur_param->next;
 	}
 	printf("%s:%d parameters sended\n", __FILE__, __LINE__);
-	message = malloc(strlen("/PARAMS\n")+1);
+	message = (char *) malloc(strlen("/PARAMS\n")+1);
 	sprintf(message, "%s", "/PARAMS\n");
 	starputop_message_add(starputop_mt,message);
 	
@@ -193,7 +193,7 @@ void starputop_init_and_wait(const char* server_name){
 	copy_data_and_param();
 	
 	//sending READY message
-	message = malloc(strlen("READY\n")+1);
+	message = (char *) malloc(strlen("READY\n")+1);
 	sprintf(message, "%s", "READY\n");
 	starputop_message_add(starputop_mt,message);
 	
@@ -221,7 +221,7 @@ starputop_data * starputop_add_data_boolean(
 			const char* data_name,
 			int active)
 {		
-	starputop_data * data = malloc(sizeof(starputop_data));
+	starputop_data * data = (starputop_data *) malloc(sizeof(starputop_data));
 	data->id = starputop_data_cpt++;
 	data->name = data_name;
 	data->type = STARPUTOP_DATA_BOOLEAN;
@@ -239,7 +239,7 @@ starputop_data * starputop_add_data_integer(
 			int maximum_value,
 			int active)
 {	
-	starputop_data * data = malloc(sizeof(starputop_data));
+	starputop_data * data = (starputop_data *) malloc(sizeof(starputop_data));
 	data->id = starputop_data_cpt++;
 	data->name = data_name; 
 	data->type = STARPUTOP_DATA_INTEGER;
@@ -259,7 +259,7 @@ starputop_data* starputop_add_data_float(
 			double maximum_value,
 			int active)
 {
-	starputop_data * data = malloc(sizeof(starputop_data));
+	starputop_data * data = (starputop_data *) malloc(sizeof(starputop_data));
 	data->id = starputop_data_cpt++;
 	data->name = data_name;
 	data->type = STARPUTOP_DATA_FLOAT;
@@ -275,7 +275,7 @@ starputop_data* starputop_add_data_float(
 
 char *message_for_topdata_init(starputop_data* data)
 {
-	char*message = malloc(256+strlen(data->name));
+	char*message = (char *) malloc(256+strlen(data->name));
 	switch(data->type)
 	{
 		case STARPUTOP_DATA_BOOLEAN:
@@ -315,7 +315,7 @@ char *message_for_topparam_init(starputop_param* param)
 	switch(param->type)
 	{
 	case STARPUTOP_PARAM_BOOLEAN:
-		message = malloc(256);
+		message = (char *) malloc(256);
 		sprintf(message,
 				"BOOL;%d;%s;%d\n",
 				param->id,
@@ -323,7 +323,7 @@ char *message_for_topparam_init(starputop_param* param)
 				(*(int*)(param->value)) ? 1 : 0);
 		break;
 	case STARPUTOP_PARAM_INTEGER:
-		message = malloc(256);
+		message = (char *) malloc(256);
 		sprintf(message,
 				"INT;%d;%s;%d;%d;%d\n",param->id,
 				param->name,
@@ -332,7 +332,7 @@ char *message_for_topparam_init(starputop_param* param)
 				*(int*)(param->value));
 		break;
 	case STARPUTOP_PARAM_FLOAT:
-		message = malloc(256);
+		message = (char *) malloc(256);
 		sprintf(message,
 				"FLOAT;%d;%s;%f;%f;%f\n",
 				param->id,
@@ -347,7 +347,7 @@ char *message_for_topparam_init(starputop_param* param)
 		{
 			length += strlen(param->enum_values[i])+1;
 		}
-		message = malloc(256+length);
+		message = (char *) malloc(256+length);
 		sprintf(message,
 				"ENUM;%d;%s;",
 				param->id,
@@ -393,7 +393,7 @@ starputop_param* starputop_register_parameter_boolean(
 			void (*callback)(struct starputop_param_t*))
 {
     STARPU_ASSERT(!starpu_top_status_get());
-	starputop_param * param = malloc(sizeof(starputop_param));
+	starputop_param * param = (starputop_param *) malloc(sizeof(starputop_param));
 	param->callback = callback;
 	param->name = param_name;
 	param->id = starputop_param_cpt++;
@@ -414,7 +414,7 @@ starputop_param* starputop_register_parameter_integer(const char* param_name,
 			void (*callback)(struct starputop_param_t*))
 {	
 	STARPU_ASSERT(!starpu_top_status_get());
-	starputop_param * param = malloc(sizeof(starputop_param));
+	starputop_param * param = (starputop_param *) malloc(sizeof(starputop_param));
 	param->callback = callback;
 	param->name = param_name;
 	param->id = starputop_param_cpt++;
@@ -436,7 +436,7 @@ starputop_param* starputop_register_parameter_float(
 			void (*callback)(struct starputop_param_t*))
 {
 	STARPU_ASSERT(!starpu_top_status_get());
-	starputop_param * param = malloc(sizeof(starputop_param));
+	starputop_param * param = (starputop_param *) malloc(sizeof(starputop_param));
 	param->callback = callback;
 	param->name = param_name;
 	param->id = starputop_param_cpt++;
@@ -459,7 +459,7 @@ starputop_param* starputop_register_parameter_enum(
 			void (*callback)(struct starputop_param_t*))
 {
 	STARPU_ASSERT(!starpu_top_status_get());
-	starputop_param * param = malloc(sizeof(starputop_param));
+	starputop_param * param = (starputop_param *) malloc(sizeof(starputop_param));
 	param->callback = callback;
 	param->name = param_name;
 	param->id = starputop_param_cpt++;
@@ -482,7 +482,7 @@ void starputop_update_data_boolean(const starputop_data* data, int value){
 		return;
 	if(data->active)
 	{
-		char*message = malloc(256+strlen(data->name));
+		char*message = (char *) malloc(256+strlen(data->name));
 		sprintf(message,
 				"U;%d;%d;%lld\n",
 				data->id,
@@ -496,7 +496,7 @@ void starputop_update_data_integer(const starputop_data* data,int value){
 		return;
 	if(data->active)
 	{
-		char*message = malloc(256+strlen(data->name));
+		char*message = (char *) malloc(256+strlen(data->name));
 		sprintf(message,
 				"U;%d;%d;%lld\n",
 				data->id,
@@ -510,7 +510,7 @@ void starputop_update_data_float(const starputop_data* data, double value){
 		return;
 	if(data->active)
 	{
-		char*message = malloc(256+strlen(data->name));
+		char*message = (char *) malloc(256+strlen(data->name));
 		sprintf(message,
 				"U;%d;%f;%lld\n",
 				data->id, value,
@@ -521,7 +521,7 @@ void starputop_update_data_float(const starputop_data* data, double value){
 void starputop_update_parameter(const starputop_param* param){
 	if (!starpu_top_status_get())
 		return;
-	char*message = malloc(50);
+	char*message = (char *) malloc(50);
 
 	switch(param->type)
 	{
@@ -556,7 +556,7 @@ void starputop_debug_log(const char* debug_message)
 	if(starputop_debug_on)
 	{
 		//length can be up to strlen*2, if message contains only unwanted chars
-		char * message = malloc(strlen(debug_message)*2+16);
+		char * message = (char *) malloc(strlen(debug_message)*2+16);
 		sprintf(message,"MESSAGE;");
 		
 		//escape unwanted char : ; and \n
@@ -583,7 +583,7 @@ void starputop_debug_lock(const char* debug_message)
 {
 	if(starputop_debug_on)
 	{
-		char * message = malloc(strlen(debug_message)*2+16);
+		char * message = (char *) malloc(strlen(debug_message)*2+16);
 		sprintf(message,"LOCK;");
 		char* cur = message+5;
 		while(*debug_message!='\0')
@@ -711,7 +711,7 @@ void starputop_change_debug_mode(const char*message)
 		printf("%s:%d debug is now OFF\n", __FILE__, __LINE__);
 	}
 
-	char * m = malloc(strlen(message)+1);
+	char * m = (char *) malloc(strlen(message)+1);
 	sprintf(m,"%s",message);
 	starputop_message_add(starputop_mt,m);
 }

+ 2 - 2
src/top/starputop_message_queue.c

@@ -29,7 +29,7 @@ starputop_message_queue_t* starputop_message_add(
 			starputop_message_queue_t* s,
 			char* msg)
 {
-	starputop_message_queue_item_t* p = malloc( 1 * sizeof(*p) );
+	starputop_message_queue_item_t* p = (starputop_message_queue_item_t *) malloc( 1 * sizeof(*p) );
 	pthread_mutex_lock(&(s->mutex));
 	if( NULL == p )
 	{
@@ -96,7 +96,7 @@ char* starputop_message_remove(starputop_message_queue_t* s)
 
 starputop_message_queue_t* starputop_message_queue_new(void)
 {
-	starputop_message_queue_t* p = malloc( 1 * sizeof(*p));
+	starputop_message_queue_t* p = (starputop_message_queue_t *) malloc( 1 * sizeof(*p));
 	if( NULL == p )
 	{
 		fprintf(stderr, "LINE: %d, malloc() failed\n", __LINE__);

+ 3 - 3
src/top/starputop_task.c

@@ -35,7 +35,7 @@ void starputop_task_started(
 {
 	unsigned long long taskid = _starpu_get_job_associated_to_task(task)->job_id;
 	STARPU_ASSERT(starpu_top_status_get());
-	char *str = malloc(sizeof(char)*64);
+	char *str = (char *) malloc(sizeof(char)*64);
 	snprintf(str, 64,
 				"START;%llu;%d;%llu\n",
 				taskid, 
@@ -53,7 +53,7 @@ void starputop_task_ended(
 	unsigned long long taskid = _starpu_get_job_associated_to_task(task)->job_id;
 	(void) devid; //unused
 	STARPU_ASSERT(starpu_top_status_get());
-	char *str = malloc(sizeof(char)*64);
+	char *str = (char *) malloc(sizeof(char)*64);
 	snprintf(str, 64,
 				"END;%llu;%llu\n", 
 				taskid, 
@@ -84,7 +84,7 @@ void starputop_task_prevision(
 	STARPU_ASSERT(starpu_top_status_get());
 	struct timespec now;
 	starpu_clock_gettime(&now);
-	char * str=malloc(sizeof(char)*200);
+	char * str= (char *)malloc(sizeof(char)*200);
 	snprintf(str, 128, 
 				"PREV;%llu;%d;%llu;%llu;%llu\n",
 				taskid,

+ 1 - 1
src/util/execute_on_all.c

@@ -27,7 +27,7 @@ struct wrapper_func_args {
 
 static void wrapper_func(void *buffers[] __attribute__ ((unused)), void *_args)
 {
-	struct wrapper_func_args *args = _args;
+	struct wrapper_func_args *args = (struct wrapper_func_args *) _args;
 	args->func(args->arg);
 }
 

+ 1 - 1
src/util/starpu_data_cpy.c

@@ -20,7 +20,7 @@
 
 static void data_cpy_func(void *descr[], void *cl_arg)
 {
-	const struct starpu_data_copy_methods *copy_methods = cl_arg;
+	const struct starpu_data_copy_methods *copy_methods = (const struct starpu_data_copy_methods *) cl_arg;
 
 	int workerid = starpu_worker_get_id();
 	enum starpu_archtype type = starpu_worker_get_type(workerid);

+ 1 - 1
src/util/starpu_insert_task.c

@@ -37,7 +37,7 @@ void starpu_pack_cl_args(char **arg_buffer, size_t *arg_buffer_size, ...)
 
 void starpu_unpack_cl_args(void *_cl_arg, ...)
 {
-	unsigned char *cl_arg = _cl_arg;
+	unsigned char *cl_arg = (unsigned char *) _cl_arg;
 	unsigned current_arg_offset = 0;
 	va_list varg_list;
 

+ 9 - 7
src/util/starpu_insert_task_utils.c

@@ -18,11 +18,13 @@
 #include <common/config.h>
 #include <common/utils.h>
 
+typedef void (*callback_func_t)(void *);
+
 /* Deal with callbacks. The unpack function may be called multiple times when
  * we have a parallel task, and we should not free the cl_arg parameter from
  * the callback function. */
 struct insert_task_cb_wrapper {
-	void (*callback_func)(void *);
+	callback_func_t callback_func;
 	void *callback_arg;
 	void *arg_stack;
 };
@@ -30,7 +32,7 @@ struct insert_task_cb_wrapper {
 static
 void starpu_task_insert_callback_wrapper(void *_cl_arg_wrapper)
 {
-	struct insert_task_cb_wrapper *cl_arg_wrapper = _cl_arg_wrapper;
+	struct insert_task_cb_wrapper *cl_arg_wrapper = (struct insert_task_cb_wrapper *) _cl_arg_wrapper;
 
 	/* Execute the callback specified by the application */
 	if (cl_arg_wrapper->callback_func)
@@ -61,7 +63,7 @@ size_t _starpu_insert_task_get_arg_size(va_list varg_list)
 			arg_buffer_size += cst_size;
 		}
 		else if (arg_type==STARPU_CALLBACK) {
-			va_arg(varg_list, void (*)(void *));
+			va_arg(varg_list, callback_func_t);
 		}
 		else if (arg_type==STARPU_CALLBACK_ARG) {
 			va_arg(varg_list, void *);
@@ -89,7 +91,7 @@ int _starpu_pack_cl_args(size_t arg_buffer_size, char **arg_buffer, va_list varg
 
 	/* The buffer will contain : nargs, {size, content} (x nargs)*/
 
-	*arg_buffer = malloc(arg_buffer_size);
+	*arg_buffer = (char *) malloc(arg_buffer_size);
 
 	/* We will begin the buffer with the number of args (which is stored as a char) */
 	current_arg_offset += sizeof(char);
@@ -117,7 +119,7 @@ int _starpu_pack_cl_args(size_t arg_buffer_size, char **arg_buffer, va_list varg
 		}
 		else if (arg_type==STARPU_CALLBACK)
 		{
-			va_arg(varg_list, void (*)(void *));
+			va_arg(varg_list, callback_func_t);
 		}
 		else if (arg_type==STARPU_CALLBACK_ARG) {
 			va_arg(varg_list, void *);
@@ -143,7 +145,7 @@ int _starpu_insert_task_create_and_submit(char *arg_buffer, starpu_codelet *cl,
         int arg_type;
 	unsigned current_buffer = 0;
 
-	struct insert_task_cb_wrapper *cl_arg_wrapper = malloc(sizeof(struct insert_task_cb_wrapper));
+	struct insert_task_cb_wrapper *cl_arg_wrapper = (struct insert_task_cb_wrapper *) malloc(sizeof(struct insert_task_cb_wrapper));
 	STARPU_ASSERT(cl_arg_wrapper);
 
 	cl_arg_wrapper->callback_func = NULL;
@@ -171,7 +173,7 @@ int _starpu_insert_task_create_and_submit(char *arg_buffer, starpu_codelet *cl,
 		else if (arg_type==STARPU_CALLBACK)
 		{
 			void (*callback_func)(void *);
-			callback_func = va_arg(varg_list, void (*)(void *));
+			callback_func = va_arg(varg_list, callback_func_t);
 			cl_arg_wrapper->callback_func = callback_func;
 		}
 		else if (arg_type==STARPU_CALLBACK_ARG) {

+ 1 - 1
tests/core/declare_deps_in_callback.c

@@ -28,7 +28,7 @@ static void callback(void *arg)
 	struct starpu_task *taskA, *taskB;
 
 	taskA = starpu_get_current_task();
-	taskB = arg;
+	taskB = (starpu_task *) arg;
 
 	starpu_task_declare_deps_array(taskB, 1, &taskA);
 	starpu_task_submit(taskB);

+ 1 - 1
tests/core/empty_task_chain.c

@@ -25,7 +25,7 @@ int main(int argc, char **argv)
 
 	starpu_init(NULL);
 
-	struct starpu_task **tasks = malloc(N*sizeof(struct starpu_task *));
+	struct starpu_task **tasks = (struct starpu_task **) malloc(N*sizeof(struct starpu_task *));
 
 	for (i = 0; i < N; i++)
 	{

+ 2 - 2
tests/core/get_current_task.c

@@ -27,14 +27,14 @@ static unsigned ntasks = 65536;
 static void check_task_func(void *descr[], void *arg)
 {
 	/* We check that the returned task is valid from the codelet */
-	struct starpu_task *task = arg;
+	struct starpu_task *task = (struct starpu_task *) arg;
 	STARPU_ASSERT(task == starpu_get_current_task());
 }
 
 static void check_task_callback(void *arg)
 {
 	/* We check that the returned task is valid from the callback */
-	struct starpu_task *task = arg;
+	struct starpu_task *task = (struct starpu_task *) arg;
 	STARPU_ASSERT(task == starpu_get_current_task());
 }
 

+ 1 - 1
tests/core/wait_all_regenerable_tasks.c

@@ -29,7 +29,7 @@ static void callback(void *arg)
 {
 	struct starpu_task *task = starpu_get_current_task();
 
-	unsigned *cnt = arg;
+	unsigned *cnt = (unsigned *) arg;
 
 	(*cnt)++;
 

+ 4 - 4
tests/datawizard/data_implicit_deps.c

@@ -71,10 +71,10 @@ int main(int argc, char **argv)
 {
 	starpu_init(NULL);
 
-	A = malloc(VECTORSIZE*sizeof(unsigned));
-	B = malloc(VECTORSIZE*sizeof(unsigned));
-	C = malloc(VECTORSIZE*sizeof(unsigned));
-	D = malloc(VECTORSIZE*sizeof(unsigned));
+	A = (unsigned *) malloc(VECTORSIZE*sizeof(unsigned));
+	B = (unsigned *) malloc(VECTORSIZE*sizeof(unsigned));
+	C = (unsigned *) malloc(VECTORSIZE*sizeof(unsigned));
+	D = (unsigned *) malloc(VECTORSIZE*sizeof(unsigned));
 
 	starpu_vector_data_register(&A_handle, 0, (uintptr_t)A, VECTORSIZE, sizeof(unsigned));
 	starpu_vector_data_register(&B_handle, 0, (uintptr_t)B, VECTORSIZE, sizeof(unsigned));

+ 3 - 3
tests/datawizard/data_lookup.c

@@ -92,10 +92,10 @@ static void test_filters()
 {
 #define CHILDREN_COUNT 10
 	int err, i;
-	void *ptr, *children_pointers[CHILDREN_COUNT];
+	int *ptr, *children_pointers[CHILDREN_COUNT];
 	starpu_data_handle handle;
 
-	err = starpu_malloc(&ptr, VECTOR_SIZE * sizeof(*ptr));
+	err = starpu_malloc((void**)&ptr, VECTOR_SIZE * sizeof(*ptr));
 	assert(err == 0);
 
 	starpu_vector_data_register(&handle, 0, (uintptr_t)ptr,
@@ -114,7 +114,7 @@ static void test_filters()
                 starpu_data_handle child;
 
 		child = starpu_data_get_sub_data(handle, 1, i);
-		children_pointers[i] = starpu_handle_get_local_ptr(child);
+		children_pointers[i] = (int *) starpu_handle_get_local_ptr(child);
 		assert(children_pointers[i] != NULL);
 
 		/* Make sure we have a pointer -> handle mapping for CHILD.  */

+ 1 - 1
tests/datawizard/handle_to_pointer.c

@@ -107,7 +107,7 @@ int main(int argc, char *argv[])
 	starpu_data_acquire(handle, STARPU_R);
 
 	/* Make sure we have a local pointer to it.  */
-	pointer = starpu_handle_to_pointer(handle, 0);
+	pointer = (int *) starpu_handle_to_pointer(handle, 0);
 	assert(pointer != NULL);
 	for(i = 0; i < count; i++)
 	{

+ 1 - 1
tests/datawizard/mpi_like.c

@@ -132,7 +132,7 @@ static void send_handle(struct thread_data *thread_data)
 static void *thread_func(void *arg)
 {
 	unsigned iter;
-	struct thread_data *thread_data = arg;
+	struct thread_data *thread_data = (struct thread_data *) arg;
 	unsigned index = thread_data->index;
 
 	starpu_variable_data_register(&thread_data->handle, 0, (uintptr_t)&thread_data->val, sizeof(unsigned));

+ 7 - 7
tests/datawizard/mpi_like_async.c

@@ -97,7 +97,7 @@ static int test_recv_handle_async(void *arg)
 //	FPRINTF(stderr, "test_recv_handle_async\n");
 
 	int ret;
-	struct thread_data *thread_data = arg;
+	struct thread_data *thread_data = (struct thread_data *) arg;
 	
 	pthread_mutex_lock(&thread_data->recv_mutex);
 
@@ -125,9 +125,9 @@ static int test_recv_handle_async(void *arg)
 
 static void recv_handle_async(void *_thread_data)
 {
-	struct thread_data *thread_data = _thread_data;
+	struct thread_data *thread_data = (struct thread_data *) _thread_data;
 
-	struct data_req *req = malloc(sizeof(struct data_req));
+	struct data_req *req = (struct data_req *) malloc(sizeof(struct data_req));
 	req->test_func = test_recv_handle_async;
 	req->test_arg = thread_data;
 	req->next = NULL;
@@ -142,7 +142,7 @@ static void recv_handle_async(void *_thread_data)
 static int test_send_handle_async(void *arg)
 {
 	int ret;
-	struct thread_data *thread_data = arg;
+	struct thread_data *thread_data = (struct thread_data *) arg;
 	struct thread_data *neighbour_data = thread_data->neighbour;
 	
 	pthread_mutex_lock(&neighbour_data->recv_mutex);
@@ -162,7 +162,7 @@ static int test_send_handle_async(void *arg)
 
 static void send_handle_async(void *_thread_data)
 {
-	struct thread_data *thread_data = _thread_data;
+	struct thread_data *thread_data = (struct thread_data *) _thread_data;
 	struct thread_data *neighbour_data = thread_data->neighbour;
 
 //	FPRINTF(stderr, "send_handle_async\n");
@@ -173,7 +173,7 @@ static void send_handle_async(void *_thread_data)
 	neighbour_data->recv_flag = 1;
 	pthread_mutex_unlock(&neighbour_data->recv_mutex);
 
-	struct data_req *req = malloc(sizeof(struct data_req));
+	struct data_req *req = (struct data_req *) malloc(sizeof(struct data_req));
 	req->test_func = test_send_handle_async;
 	req->test_arg = thread_data;
 	req->next = NULL;
@@ -247,7 +247,7 @@ static void *progress_func(void *arg)
 static void *thread_func(void *arg)
 {
 	unsigned iter;
-	struct thread_data *thread_data = arg;
+	struct thread_data *thread_data = (struct thread_data *) arg;
 	unsigned index = thread_data->index;
 
 	starpu_variable_data_register(&thread_data->handle, 0, (uintptr_t)&thread_data->val, sizeof(unsigned));

+ 3 - 3
tests/datawizard/reclaim.c

@@ -87,13 +87,13 @@ int main(int argc, char **argv)
 	float **host_ptr_array;
 	starpu_data_handle *handle_array;
 
-	host_ptr_array = calloc(mb, sizeof(float *));
-	handle_array = calloc(mb, sizeof(starpu_data_handle));
+	host_ptr_array = (float **) calloc(mb, sizeof(float *));
+	handle_array = (starpu_data_handle *) calloc(mb, sizeof(starpu_data_handle));
 
 	/* Register mb buffers of 1MB */
 	for (i = 0; i < mb; i++)
 	{
-		host_ptr_array[i] = malloc(BLOCK_SIZE);
+		host_ptr_array[i] = (float *) malloc(BLOCK_SIZE);
 		assert(host_ptr_array[i]);
 		starpu_variable_data_register(&handle_array[i], 0,
 			(uintptr_t)host_ptr_array[i], BLOCK_SIZE);

+ 1 - 1
tests/datawizard/scratch.c

@@ -63,7 +63,7 @@ int main(int argc, char **argv)
 {
 	starpu_init(NULL);
 
-	A = calloc(VECTORSIZE, sizeof(unsigned));
+	A = (unsigned *) calloc(VECTORSIZE, sizeof(unsigned));
 
 	starpu_vector_data_register(&A_handle, 0, (uintptr_t)A, VECTORSIZE, sizeof(unsigned));
 	starpu_vector_data_register(&B_handle, -1, (uintptr_t)NULL, VECTORSIZE, sizeof(unsigned));

+ 1 - 1
tests/datawizard/user_interaction_implicit.c

@@ -35,7 +35,7 @@ struct data buffers[NBUFFERS];
 
 void callback_sync_data(void *arg)
 {
-	struct data *data = arg;
+	struct data *data = (struct data *) arg;
 
 	data->val++;
 

+ 1 - 1
tests/helper/execute_on_all.c

@@ -23,7 +23,7 @@
 
 void func(void *arg)
 {
-	int *ptr = arg;
+	int *ptr = (int *) arg;
 	STARPU_ASSERT(*ptr == 0x42);
 }
 

+ 1 - 1
tests/microbenchs/async_tasks_overhead.c

@@ -128,7 +128,7 @@ int main(int argc, char **argv)
 	fprintf(stderr, "#tasks : %u\n", ntasks);
 
 	/* Create an array of tasks */
-	struct starpu_task **tasks = malloc(ntasks*sizeof(struct starpu_task *));
+	struct starpu_task **tasks = (struct starpu_task **) malloc(ntasks*sizeof(struct starpu_task *));
 
 	for (i = 0; i < ntasks; i++)
 	{

+ 2 - 2
tests/microbenchs/tasks_overhead.c

@@ -91,7 +91,7 @@ int main(int argc, char **argv)
 	unsigned buffer;
 	for (buffer = 0; buffer < nbuffers; buffer++)
 	{
-		buffers[buffer] = malloc(16*sizeof(float));
+		buffers[buffer] = (float *) malloc(16*sizeof(float));
 		starpu_vector_data_register(&data_handles[buffer], 0, (uintptr_t)buffers[buffer], 16, sizeof(float));
 	}
 
@@ -100,7 +100,7 @@ int main(int argc, char **argv)
 	fprintf(stderr, "#tasks : %u\n#buffers : %u\n", ntasks, nbuffers);
 
 	/* submit tasks (but don't execute them yet !) */
-	tasks = malloc(ntasks*sizeof(struct starpu_task));
+	tasks = (struct starpu_task *) malloc(ntasks*sizeof(struct starpu_task));
 
 	gettimeofday(&start_submit, NULL);
 	for (i = 0; i < ntasks; i++)

+ 5 - 5
tools/starpu_perfmodel_display.c

@@ -245,7 +245,7 @@ static void display_all_perf_models(struct starpu_perfmodel_t *model)
 		unsigned archid;
 		for (archid = 0; archid < STARPU_NARCH_VARIATIONS; archid++)
 		{
-			display_perf_model(model, archid);
+			display_perf_model(model, (starpu_perf_archtype) archid);
 		}
 	}
 	else {
@@ -264,7 +264,7 @@ static void display_all_perf_models(struct starpu_perfmodel_t *model)
 				exit(-1);
 			}
 
-			display_perf_model(model, STARPU_CPU_DEFAULT + k - 1);
+			display_perf_model(model, (starpu_perf_archtype) (STARPU_CPU_DEFAULT + k - 1));
 			return;
 		}
 
@@ -273,9 +273,9 @@ static void display_all_perf_models(struct starpu_perfmodel_t *model)
 			for (archid = STARPU_CUDA_DEFAULT; archid < STARPU_CUDA_DEFAULT + STARPU_MAXCUDADEVS; archid++)
 			{
 				char archname[32];
-				starpu_perfmodel_get_arch_name(archid, archname, 32);
+				starpu_perfmodel_get_arch_name((starpu_perf_archtype) archid, archname, 32);
 				fprintf(stderr, "performance model for %s\n", archname);
-				display_perf_model(model, archid);
+				display_perf_model(model, (starpu_perf_archtype) archid);
 			}
 			return;
 		}
@@ -287,7 +287,7 @@ static void display_all_perf_models(struct starpu_perfmodel_t *model)
 		if (nmatched == 1)
 		{
 			unsigned archid = STARPU_CUDA_DEFAULT+ gpuid;
-			display_perf_model(model, archid);
+			display_perf_model(model, (starpu_perf_archtype) archid);
 			return;
 		}
 

+ 10 - 10
tools/starpu_perfmodel_plot.c

@@ -190,14 +190,14 @@ static void display_history_based_perf_models(FILE *gnuplot_file, struct starpu_
 	char *command;
 	FILE *datafile;
 	unsigned n = arch2 - arch1;
-	enum starpu_perf_archtype arch;
+	unsigned arch;
 	struct starpu_history_list_t *ptr[n], *ptrs[n];
 	char archname[32];
 	int col;
 	int len;
 
 	len = 10 + strlen(avg_file_name) + 1;
-	command = malloc(len);
+	command = (char *) malloc(len);
 	snprintf(command, len, "sort -n > %s", avg_file_name);
 	datafile = popen(command, "w");
 	free(command);
@@ -205,7 +205,7 @@ static void display_history_based_perf_models(FILE *gnuplot_file, struct starpu_
 	col = 2;
 	for (arch = arch1; arch < arch2; arch++) {
 		struct starpu_per_arch_perfmodel_t *arch_model = &model->per_arch[arch];
-		starpu_perfmodel_get_arch_name(arch, archname, 32);
+		starpu_perfmodel_get_arch_name((starpu_perf_archtype) arch, archname, 32);
 
 		ptrs[arch-arch1] = ptr[arch-arch1] = arch_model->list;
 
@@ -259,9 +259,9 @@ static void display_history_based_perf_models(FILE *gnuplot_file, struct starpu_
 
 static void display_perf_models(FILE *gnuplot_file, struct starpu_perfmodel_t *model, enum starpu_perf_archtype arch1, enum starpu_perf_archtype arch2, int *first)
 {
-	enum starpu_perf_archtype arch;
+	unsigned arch;
 	for (arch = arch1; arch < arch2; arch++)
-		display_perf_model(gnuplot_file, model, arch, first);
+		display_perf_model(gnuplot_file, model, (starpu_perf_archtype) arch, first);
 	display_history_based_perf_models(gnuplot_file, model, arch1, arch2, first);
 }
 
@@ -313,7 +313,7 @@ static void display_selected_models(FILE *gnuplot_file, struct starpu_perfmodel_
 	if (arch == NULL)
 	{
 		/* display all architectures */
-		display_perf_models(gnuplot_file, model, 0, STARPU_NARCH_VARIATIONS, &first);
+		display_perf_models(gnuplot_file, model, (starpu_perf_archtype) 0, (starpu_perf_archtype) STARPU_NARCH_VARIATIONS, &first);
 	}
 	else {
 		if (strcmp(arch, "cpu") == 0) {
@@ -331,12 +331,12 @@ static void display_selected_models(FILE *gnuplot_file, struct starpu_perfmodel_
 				exit(-1);
 			}
 
-			display_perf_models(gnuplot_file, model, STARPU_CPU_DEFAULT + k - 1, STARPU_CPU_DEFAULT + k, &first);
+			display_perf_models(gnuplot_file, model, (starpu_perf_archtype) (STARPU_CPU_DEFAULT + k - 1), (starpu_perf_archtype) (STARPU_CPU_DEFAULT + k), &first);
 			return;
 		}
 
 		if (strcmp(arch, "cuda") == 0) {
-			display_perf_models(gnuplot_file, model, STARPU_CUDA_DEFAULT, STARPU_CUDA_DEFAULT + STARPU_MAXCUDADEVS, &first);
+			display_perf_models(gnuplot_file, model, STARPU_CUDA_DEFAULT, (starpu_perf_archtype) (STARPU_CUDA_DEFAULT + STARPU_MAXCUDADEVS), &first);
 			return;
 		}
 
@@ -347,12 +347,12 @@ static void display_selected_models(FILE *gnuplot_file, struct starpu_perfmodel_
 		if (nmatched == 1)
 		{
 			unsigned archid = STARPU_CUDA_DEFAULT+ gpuid;
-			display_perf_models(gnuplot_file, model, archid, archid + 1, &first);
+			display_perf_models(gnuplot_file, model, (starpu_perf_archtype) archid, (starpu_perf_archtype) (archid + 1), &first);
 			return;
 		}
 
 		if (strcmp(arch, "gordon") == 0) {
-			display_perf_models(gnuplot_file, model, STARPU_GORDON_DEFAULT, STARPU_GORDON_DEFAULT + 1, &first);
+			display_perf_models(gnuplot_file, model, STARPU_GORDON_DEFAULT, (starpu_perf_archtype) (STARPU_GORDON_DEFAULT + 1), &first);
 			return;
 		}