Browse Source

tests: turn function static when it makes sense to do so

Nathalie Furmento 11 years ago
parent
commit
0c6c658cb1
80 changed files with 166 additions and 50 deletions
  1. 1 1
      tests/Makefile.am
  2. 1 0
      tests/datawizard/acquire_cb.c
  3. 3 0
      tests/datawizard/acquire_cb_insert.c
  4. 3 0
      tests/datawizard/acquire_release.c
  5. 3 0
      tests/datawizard/acquire_release2.c
  6. 2 0
      tests/datawizard/allocate.c
  7. 5 6
      tests/datawizard/commute.c
  8. 1 0
      tests/datawizard/copy.c
  9. 2 1
      tests/datawizard/cuda_codelet_unsigned_inc.cu
  10. 4 1
      tests/datawizard/data_implicit_deps.c
  11. 3 1
      tests/datawizard/data_invalidation.c
  12. 1 0
      tests/datawizard/data_lookup.c
  13. 3 1
      tests/datawizard/dining_philosophers.c
  14. 1 0
      tests/datawizard/double_parameter.c
  15. 1 0
      tests/datawizard/dsm_stress.c
  16. 1 0
      tests/datawizard/handle_to_pointer.c
  17. 4 3
      tests/datawizard/increment_redux.c
  18. 4 3
      tests/datawizard/increment_redux_lazy.c
  19. 3 2
      tests/datawizard/increment_redux_v2.c
  20. 2 0
      tests/datawizard/interfaces/multiformat/advanced/generic.c
  21. 1 0
      tests/datawizard/interfaces/void/void_interface.c
  22. 2 0
      tests/datawizard/lazy_allocation.c
  23. 5 8
      tests/datawizard/mpi_like.c
  24. 1 0
      tests/datawizard/mpi_like_async.c
  25. 2 1
      tests/datawizard/readers_and_writers.c
  26. 2 1
      tests/datawizard/scratch.c
  27. 2 0
      tests/datawizard/sync_and_notify_data.c
  28. 2 0
      tests/datawizard/sync_and_notify_data_implicit.c
  29. 2 0
      tests/datawizard/sync_with_data_with_mem.c
  30. 3 0
      tests/datawizard/sync_with_data_with_mem_non_blocking.c
  31. 3 0
      tests/datawizard/sync_with_data_with_mem_non_blocking_implicit.c
  32. 3 1
      tests/datawizard/unpartition.c
  33. 1 0
      tests/datawizard/user_interaction_implicit.c
  34. 3 1
      tests/datawizard/write_only_tmp_buffer.c
  35. 1 0
      tests/errorcheck/invalid_blocking_calls.c
  36. 2 1
      tests/helper/execute_on_all.c
  37. 2 1
      tests/helper/starpu_create_sync_task.c
  38. 1 0
      tests/main/codelet_null_callback.c
  39. 1 0
      tests/main/declare_deps_after_submission.c
  40. 1 0
      tests/main/declare_deps_after_submission_synchronous.c
  41. 1 0
      tests/main/declare_deps_in_callback.c
  42. 5 0
      tests/main/deprecated_buffer.c
  43. 3 0
      tests/main/deprecated_func.c
  44. 1 0
      tests/main/empty_task_sync_point.c
  45. 2 1
      tests/main/empty_task_sync_point_tasks.c
  46. 1 0
      tests/main/execute_on_a_specific_worker.c
  47. 1 0
      tests/main/get_current_task.c
  48. 3 0
      tests/main/insert_task.c
  49. 1 0
      tests/main/insert_task_array.c
  50. 2 0
      tests/main/multithreaded.c
  51. 2 0
      tests/main/multithreaded_init.c
  52. 3 1
      tests/main/regenerate.c
  53. 1 0
      tests/main/starpu_task_bundle.c
  54. 1 0
      tests/main/starpu_task_wait.c
  55. 1 0
      tests/main/starpu_task_wait_for_all.c
  56. 1 0
      tests/main/starpu_worker_exists.c
  57. 2 1
      tests/main/static_restartable.c
  58. 2 1
      tests/main/static_restartable_tag.c
  59. 2 1
      tests/main/static_restartable_using_initializer.c
  60. 1 0
      tests/main/subgraph_repeat.c
  61. 1 0
      tests/main/subgraph_repeat_regenerate_tag.c
  62. 1 0
      tests/main/subgraph_repeat_tag.c
  63. 1 0
      tests/main/tag_wait_api.c
  64. 1 0
      tests/main/task_wait_api.c
  65. 1 0
      tests/main/wait_all_regenerable_tasks.c
  66. 1 0
      tests/microbenchs/async_tasks_overhead.c
  67. 6 0
      tests/microbenchs/matrix_as_vector.c
  68. 3 1
      tests/microbenchs/prefetch_data_on_node.c
  69. 8 4
      tests/microbenchs/redundant_buffer.c
  70. 2 0
      tests/microbenchs/sync_tasks_overhead.c
  71. 2 0
      tests/microbenchs/tasks_overhead.c
  72. 1 0
      tests/overlap/overlap.c
  73. 2 1
      tests/parallel_tasks/explicit_combined_worker.c
  74. 2 1
      tests/parallel_tasks/parallel_kernels.c
  75. 2 1
      tests/parallel_tasks/parallel_kernels_spmd.c
  76. 2 1
      tests/parallel_tasks/spmd_peager.c
  77. 2 1
      tests/perfmodels/non_linear_regression_based.c
  78. 1 0
      tests/perfmodels/regression_based.c
  79. 1 0
      tests/perfmodels/value_nan.c
  80. 2 2
      tests/sched_policies/execute_all_tasks.c

+ 1 - 1
tests/Makefile.am

@@ -61,7 +61,7 @@ if STARPU_USE_CUDA
 # TODO define NVCCFLAGS
 NVCC ?= nvcc
 
-NVCCFLAGS += -I$(top_srcdir)/include/ -I$(top_srcdir)/src -I$(top_builddir)/src -I$(top_builddir)/include $(HWLOC_CFLAGS) $(SIMGRID_CFLAGS)
+NVCCFLAGS += -I$(top_srcdir)/include/ -I$(top_srcdir)/src -I$(top_builddir)/src -I$(top_builddir)/src/common -I$(top_builddir)/include $(HWLOC_CFLAGS) $(SIMGRID_CFLAGS)
 
 .cu.cubin:
 	$(MKDIR_P) `dirname $@`

+ 1 - 0
tests/datawizard/acquire_cb.c

@@ -20,6 +20,7 @@
 unsigned token = 0;
 starpu_data_handle_t token_handle;
 
+static
 void callback(void *arg STARPU_ATTRIBUTE_UNUSED)
 {
 	token = 42;

+ 3 - 0
tests/datawizard/acquire_cb_insert.c

@@ -22,6 +22,7 @@
 #define M 4
 #define X 2
 
+static
 void which_index_cpu(void *descr[], void *_args)
 {
 	int *x0 = (int *)STARPU_VARIABLE_GET_PTR(descr[0]);
@@ -38,6 +39,7 @@ struct starpu_codelet which_index =
 	.modes = {STARPU_W}
 };
 
+static
 void work_cpu(void *descr[], void *_args)
 {
 	int i, n = STARPU_VECTOR_GET_NX(descr[0]);
@@ -58,6 +60,7 @@ struct starpu_codelet work =
 static int x;
 static starpu_data_handle_t x_handle, f_handle;
 
+static
 void callback(void *arg)
 {
 	starpu_task_insert(&work, STARPU_W, starpu_data_get_sub_data(f_handle, 1, x), 0);

+ 3 - 0
tests/datawizard/acquire_release.c

@@ -32,6 +32,7 @@ extern void increment_cuda(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args);
 extern void increment_opencl(void *buffers[], void *args);
 #endif
 
+static
 void increment_cpu(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args)
 {
 	unsigned *tokenptr = (unsigned *)STARPU_VARIABLE_GET_PTR(descr[0]);
@@ -55,6 +56,7 @@ static struct starpu_codelet increment_cl =
 unsigned token = 0;
 starpu_data_handle_t token_handle;
 
+static
 int increment_token(void)
 {
 	int ret;
@@ -66,6 +68,7 @@ int increment_token(void)
 	return ret;
 }
 
+static
 void callback(void *arg STARPU_ATTRIBUTE_UNUSED)
 {
         starpu_data_release(token_handle);

+ 3 - 0
tests/datawizard/acquire_release2.c

@@ -32,6 +32,7 @@ extern void increment_cuda(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args);
 extern void increment_opencl(void *buffers[], void *args);
 #endif
 
+static
 void increment_cpu(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args)
 {
 	unsigned *tokenptr = (unsigned *)STARPU_VARIABLE_GET_PTR(descr[0]);
@@ -55,6 +56,7 @@ static struct starpu_codelet increment_cl =
 unsigned token = 0;
 starpu_data_handle_t token_handle;
 
+static
 int increment_token(int synchronous)
 {
 	struct starpu_task *task = starpu_task_create();
@@ -64,6 +66,7 @@ int increment_token(int synchronous)
 	return starpu_task_submit(task);
 }
 
+static
 void callback(void *arg STARPU_ATTRIBUTE_UNUSED)
 {
         starpu_data_release(token_handle);

+ 2 - 0
tests/datawizard/allocate.c

@@ -31,6 +31,7 @@ int main(int argc, char **argv)
 }
 #else
 
+static
 int test_prefetch(unsigned memnodes)
 {
 	int ret;
@@ -120,6 +121,7 @@ int test_prefetch(unsigned memnodes)
 	return 0;
 }
 
+static
 void test_malloc()
 {
 	int ret;

+ 5 - 6
tests/datawizard/commute.c

@@ -18,6 +18,7 @@
 #include <starpu.h>
 #include "../helper.h"
 
+static
 void begin(void *descr[], void *_args STARPU_ATTRIBUTE_UNUSED)
 {
 	int *x = (int *)STARPU_VARIABLE_GET_PTR(descr[0]);
@@ -32,8 +33,7 @@ static struct starpu_codelet codelet_begin =
 	.nbuffers = 1,
 };
 
-
-
+static
 void commute1(void *descr[], void *_args STARPU_ATTRIBUTE_UNUSED)
 {
 	int *x = (int *)STARPU_VARIABLE_GET_PTR(descr[0]);
@@ -49,8 +49,7 @@ static struct starpu_codelet codelet_commute1 =
 	.modes = {STARPU_RW | STARPU_COMMUTE}
 };
 
-
-
+static
 void commute2(void *descr[], void *_args STARPU_ATTRIBUTE_UNUSED)
 {
 	int *x = (int *)STARPU_VARIABLE_GET_PTR(descr[0]);
@@ -66,6 +65,7 @@ static struct starpu_codelet codelet_commute2 =
 	.modes = {STARPU_W | STARPU_COMMUTE}
 };
 
+static
 void commute3(void *descr[] STARPU_ATTRIBUTE_UNUSED, void *_args STARPU_ATTRIBUTE_UNUSED)
 {
 }
@@ -78,9 +78,8 @@ static struct starpu_codelet codelet_commute3 =
 	.modes = {STARPU_RW | STARPU_COMMUTE}
 };
 
-
-
 static struct starpu_codelet codelet_end;
+static
 void end(void *descr[], void *_args STARPU_ATTRIBUTE_UNUSED)
 {
 	int *x = (int *)STARPU_VARIABLE_GET_PTR(descr[0]);

+ 1 - 0
tests/datawizard/copy.c

@@ -24,6 +24,7 @@ static unsigned nloops = 10;
 static unsigned nloops = 1000;
 #endif
 
+static
 void dummy_func(void *descr[] STARPU_ATTRIBUTE_UNUSED, void *arg STARPU_ATTRIBUTE_UNUSED)
 {
 }

+ 2 - 1
tests/datawizard/cuda_codelet_unsigned_inc.cu

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2010  Université de Bordeaux 1
- * Copyright (C) 2010, 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2012, 2013  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -16,6 +16,7 @@
  */
 
 #include <starpu.h>
+#include "./mpi_like.h"
 
 static __global__ void _cuda_unsigned_inc(unsigned *val)
 {

+ 4 - 1
tests/datawizard/data_implicit_deps.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2010, 2013  Université de Bordeaux 1
- * Copyright (C) 2010, 2011, 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -31,6 +31,7 @@ starpu_data_handle_t A_handle, B_handle, C_handle, D_handle;
 static unsigned var = 0;
 starpu_data_handle_t var_handle;
 
+static
 void f(void *descr[] STARPU_ATTRIBUTE_UNUSED, void *_args STARPU_ATTRIBUTE_UNUSED)
 {
 	STARPU_SKIP_IF_VALGRIND;
@@ -48,6 +49,7 @@ static struct starpu_codelet cl_f =
 	.nbuffers = 3,
 };
 
+static
 void g(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args)
 {
 	STARPU_SKIP_IF_VALGRIND;
@@ -84,6 +86,7 @@ static struct starpu_codelet cl_g =
 	.nbuffers = 3,
 };
 
+static
 void h(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args)
 {
 	STARPU_SKIP_IF_VALGRIND;

+ 3 - 1
tests/datawizard/data_invalidation.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2010, 2012  Université de Bordeaux 1
- * Copyright (C) 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2012, 2013  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -78,6 +78,7 @@ static void opencl_memset_codelet(void *buffers[], void *args)
 }
 #endif /* !STARPU_USE_OPENCL */
 
+static
 void cpu_memset_codelet(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args)
 {
 	STARPU_SKIP_IF_VALGRIND;
@@ -106,6 +107,7 @@ static struct starpu_codelet memset_cl =
  *	Check content
  */
 
+static
 void cpu_check_content_codelet(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args)
 {
 	STARPU_SKIP_IF_VALGRIND;

+ 1 - 0
tests/datawizard/data_lookup.c

@@ -22,6 +22,7 @@
 #include <sys/types.h>
 #include "../helper.h"
 
+static
 void task(void **buffers, void *args)
 {
 	float *numbers;

+ 3 - 1
tests/datawizard/dining_philosophers.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2009, 2010  Université de Bordeaux 1
- * Copyright (C) 2010, 2011, 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -24,6 +24,7 @@
 starpu_data_handle_t fork_handles[N];
 unsigned forks[N];
 
+static
 void eat_kernel(void *descr[], void *arg)
 {
 }
@@ -38,6 +39,7 @@ static struct starpu_codelet eating_cl =
 	.nbuffers = 2
 };
 
+static
 int submit_one_task(unsigned p)
 {
 	struct starpu_task *task = starpu_task_create();

+ 1 - 0
tests/datawizard/double_parameter.c

@@ -18,6 +18,7 @@
 #include <starpu.h>
 #include "../helper.h"
 
+static
 void dummy_func(void *descr[] STARPU_ATTRIBUTE_UNUSED, void *arg STARPU_ATTRIBUTE_UNUSED)
 {
 }

+ 1 - 0
tests/datawizard/dsm_stress.c

@@ -65,6 +65,7 @@ static void opencl_codelet_null(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_ar
 {
 }
 
+static
 void cpu_codelet_null(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args)
 {
 }

+ 1 - 0
tests/datawizard/handle_to_pointer.c

@@ -21,6 +21,7 @@
 #include <stdlib.h>
 #include "../helper.h"
 
+static
 void cpu_task(void **buffers, void *args)
 {
 	int *numbers;

+ 4 - 3
tests/datawizard/increment_redux.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2010, 2012-2013  Université de Bordeaux 1
- * Copyright (C) 2010, 2011, 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -98,8 +98,7 @@ static void neutral_opencl_kernel(void *descr[], void *arg)
 }
 #endif
 
-
-
+static
 void redux_cpu_kernel(void *descr[], void *arg)
 {
 	STARPU_SKIP_IF_VALGRIND;
@@ -109,6 +108,7 @@ void redux_cpu_kernel(void *descr[], void *arg)
 	*dst = *dst + *src;
 }
 
+static
 void neutral_cpu_kernel(void *descr[], void *arg)
 {
 	STARPU_SKIP_IF_VALGRIND;
@@ -188,6 +188,7 @@ static void increment_cuda_kernel(void *descr[], void *arg)
 }
 #endif
 
+static
 void increment_cpu_kernel(void *descr[], void *arg)
 {
 	STARPU_SKIP_IF_VALGRIND;

+ 4 - 3
tests/datawizard/increment_redux_lazy.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2010, 2012-2013  Université de Bordeaux 1
- * Copyright (C) 2010, 2011, 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -88,8 +88,7 @@ static void neutral_opencl_kernel(void *descr[], void *arg)
 }
 #endif
 
-
-
+static
 void redux_cpu_kernel(void *descr[], void *arg)
 {
 	unsigned *dst = (unsigned *)STARPU_VARIABLE_GET_PTR(descr[0]);
@@ -97,6 +96,7 @@ void redux_cpu_kernel(void *descr[], void *arg)
 	*dst = *dst + *src;
 }
 
+static
 void neutral_cpu_kernel(void *descr[], void *arg)
 {
 	unsigned *dst = (unsigned *)STARPU_VARIABLE_GET_PTR(descr[0]);
@@ -170,6 +170,7 @@ static void increment_cuda_kernel(void *descr[], void *arg)
 }
 #endif
 
+static
 void increment_cpu_kernel(void *descr[], void *arg)
 {
 	unsigned *tokenptr = (unsigned *)STARPU_VARIABLE_GET_PTR(descr[0]);

+ 3 - 2
tests/datawizard/increment_redux_v2.c

@@ -97,8 +97,7 @@ static void neutral_opencl_kernel(void *descr[], void *arg)
 }
 #endif
 
-
-
+static
 void redux_cpu_kernel(void *descr[], void *arg)
 {
 	STARPU_SKIP_IF_VALGRIND;
@@ -108,6 +107,7 @@ void redux_cpu_kernel(void *descr[], void *arg)
 	*dst = *dst + *src;
 }
 
+static
 void neutral_cpu_kernel(void *descr[], void *arg)
 {
 	STARPU_SKIP_IF_VALGRIND;
@@ -187,6 +187,7 @@ static void increment_cuda_kernel(void *descr[], void *arg)
 }
 #endif
 
+static
 void increment_cpu_kernel(void *descr[], void *arg)
 {
 	STARPU_SKIP_IF_VALGRIND;

+ 2 - 0
tests/datawizard/interfaces/multiformat/advanced/generic.c

@@ -73,6 +73,7 @@ void opencl_func(void *buffers[], void *args)
 	global_stats.opencl++;
 }
 
+static
 void cpu_to_opencl_func(void *buffers[], void *args)
 {
 	STARPU_SKIP_IF_VALGRIND;
@@ -80,6 +81,7 @@ void cpu_to_opencl_func(void *buffers[], void *args)
 	global_stats.cpu_to_opencl++;
 }
 
+static
 void opencl_to_cpu_func(void *buffers[], void *args)
 {
 	STARPU_SKIP_IF_VALGRIND;

+ 1 - 0
tests/datawizard/interfaces/void/void_interface.c

@@ -17,6 +17,7 @@
 #include "../test_interfaces.h"
 #include "../../../helper.h"
 
+static
 void fake_func(void *buffers[], void *arg)
 {
 	(void) buffers;

+ 2 - 0
tests/datawizard/lazy_allocation.c

@@ -73,6 +73,7 @@ static void opencl_memset_codelet(void *buffers[], void *args)
 }
 #endif
 
+static
 void cpu_memset_codelet(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args)
 {
 	STARPU_SKIP_IF_VALGRIND;
@@ -101,6 +102,7 @@ static struct starpu_codelet memset_cl =
  *	Check content
  */
 
+static
 void cpu_check_content_codelet(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args)
 {
 	STARPU_SKIP_IF_VALGRIND;

+ 5 - 8
tests/datawizard/mpi_like.c

@@ -18,8 +18,9 @@
 #include <config.h>
 #include <starpu.h>
 #include <errno.h>
-#include "../helper.h"
 #include <common/thread.h>
+#include "../helper.h"
+#include "./mpi_like.h"
 
 #define NTHREADS	4
 #define NITER		2
@@ -46,13 +47,8 @@ static struct thread_data problem_data[NTHREADS];
 /* We implement some ring transfer, every thread will try to receive a piece of
  * data from its neighbour and increment it before transmitting it to its
  * successor. */
-#ifdef STARPU_USE_CUDA
-void cuda_codelet_unsigned_inc(void *descr[], STARPU_ATTRIBUTE_UNUSED void *cl_arg);
-#endif
-#ifdef STARPU_USE_OPENCL
-void opencl_codelet_unsigned_inc(void *buffers[], void *args);
-#endif
 
+static
 void increment_handle_cpu_kernel(void *descr[], void *cl_arg STARPU_ATTRIBUTE_UNUSED)
 {
 	unsigned *val = (unsigned *)STARPU_VARIABLE_GET_PTR(descr[0]);
@@ -73,7 +69,8 @@ static struct starpu_codelet increment_handle_cl =
 	.nbuffers = 1
 };
 
-static void increment_handle(struct thread_data *thread_data)
+static
+void increment_handle(struct thread_data *thread_data)
 {
 	struct starpu_task *task = starpu_task_create();
 	task->cl = &increment_handle_cl;

+ 1 - 0
tests/datawizard/mpi_like_async.c

@@ -74,6 +74,7 @@ void cuda_codelet_unsigned_inc(void *descr[], STARPU_ATTRIBUTE_UNUSED void *cl_a
 void opencl_codelet_unsigned_inc(void *buffers[], void *args);
 #endif
 
+static
 void increment_handle_cpu_kernel(void *descr[], void *cl_arg STARPU_ATTRIBUTE_UNUSED)
 {
 	unsigned *val = (unsigned *)STARPU_VARIABLE_GET_PTR(descr[0]);

+ 2 - 1
tests/datawizard/readers_and_writers.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2009, 2010  Université de Bordeaux 1
- * Copyright (C) 2010, 2011, 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -21,6 +21,7 @@
 static unsigned book = 0;
 static starpu_data_handle_t book_handle;
 
+static
 void dummy_kernel(void *descr[], void *arg)
 {
 }

+ 2 - 1
tests/datawizard/scratch.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2010  Université de Bordeaux 1
- * Copyright (C) 2010, 2011, 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -43,6 +43,7 @@ extern void cuda_f(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args);
 extern void opencl_f(void *buffers[], void *args);
 #endif
 
+static
 void cpu_f(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args)
 {
 	STARPU_SKIP_IF_VALGRIND;

+ 2 - 0
tests/datawizard/sync_and_notify_data.c

@@ -61,12 +61,14 @@ struct starpu_opencl_program opencl_code;
 starpu_data_handle_t v_handle;
 static unsigned v[VECTORSIZE] STARPU_ATTRIBUTE_ALIGNED(128) = {0, 0, 0, 0};
 
+static
 void cpu_codelet_incA(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args)
 {
 	unsigned *val = (unsigned *)STARPU_VECTOR_GET_PTR(descr[0]);
 	val[0]++;
 }
 
+static
 void cpu_codelet_incC(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args)
 {
 	unsigned *val = (unsigned *)STARPU_VECTOR_GET_PTR(descr[0]);

+ 2 - 0
tests/datawizard/sync_and_notify_data_implicit.c

@@ -60,12 +60,14 @@ struct starpu_opencl_program opencl_code;
 starpu_data_handle_t v_handle;
 static unsigned v[VECTORSIZE] STARPU_ATTRIBUTE_ALIGNED(128) = {0, 0, 0, 0};
 
+static
 void cpu_codelet_incA(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args)
 {
 	unsigned *val = (unsigned *)STARPU_VECTOR_GET_PTR(descr[0]);
 	val[0]++;
 }
 
+static
 void cpu_codelet_incC(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args)
 {
 	unsigned *val = (unsigned *)STARPU_VECTOR_GET_PTR(descr[0]);

+ 2 - 0
tests/datawizard/sync_with_data_with_mem.c

@@ -34,6 +34,7 @@ float *buffer[NBUFFERS_DEF];
 
 starpu_data_handle_t v_handle[NBUFFERS_DEF];
 
+static
 void dummy_codelet(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args)
 {
 }
@@ -52,6 +53,7 @@ static struct starpu_codelet cl =
 	.nbuffers = 1
 };
 
+static
 int use_handle(starpu_data_handle_t handle)
 {
 	int ret;

+ 3 - 0
tests/datawizard/sync_with_data_with_mem_non_blocking.c

@@ -35,6 +35,7 @@ float *buffer[NBUFFERS_DEF];
 
 starpu_data_handle_t v_handle[NBUFFERS_DEF];
 
+static
 void dummy_codelet(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args)
 {
 }
@@ -53,6 +54,7 @@ static struct starpu_codelet cl =
 	.nbuffers = 1
 };
 
+static
 int use_handle(starpu_data_handle_t handle)
 {
 	int ret;
@@ -70,6 +72,7 @@ static starpu_pthread_mutex_t mutex = STARPU_PTHREAD_MUTEX_INITIALIZER;
 static starpu_pthread_cond_t cond = STARPU_PTHREAD_COND_INITIALIZER;
 static unsigned n_synced_buffers;
 
+static
 void callback_sync_data(void *arg STARPU_ATTRIBUTE_UNUSED)
 {
 	STARPU_PTHREAD_MUTEX_LOCK(&mutex);

+ 3 - 0
tests/datawizard/sync_with_data_with_mem_non_blocking_implicit.c

@@ -35,6 +35,7 @@ float *buffer[NBUFFERS_DEF];
 
 starpu_data_handle_t v_handle[NBUFFERS_DEF];
 
+static
 void dummy_codelet(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args)
 {
 }
@@ -53,6 +54,7 @@ static struct starpu_codelet cl =
 	.nbuffers = 1
 };
 
+static
 int use_handle(starpu_data_handle_t handle)
 {
 	int ret;
@@ -70,6 +72,7 @@ static starpu_pthread_mutex_t mutex = STARPU_PTHREAD_MUTEX_INITIALIZER;
 static starpu_pthread_cond_t cond = STARPU_PTHREAD_COND_INITIALIZER;
 static unsigned n_synced_buffers;
 
+static
 void callback_sync_data(void *arg STARPU_ATTRIBUTE_UNUSED)
 {
 	STARPU_PTHREAD_MUTEX_LOCK(&mutex);

+ 3 - 1
tests/datawizard/unpartition.c

@@ -2,7 +2,7 @@
  *
  * Copyright (C) 2010-2012  Université de Bordeaux 1
  * Copyright (C) 2010  Mehdi Juhoor <mjuhoor@gmail.com>
- * Copyright (C) 2010, 2011, 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -34,6 +34,7 @@ float *buffer;
 
 starpu_data_handle_t v_handle;
 
+static
 void dummy_codelet(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args)
 {
 }
@@ -52,6 +53,7 @@ static struct starpu_codelet cl =
 	.nbuffers = 1
 };
 
+static
 struct starpu_task* create_task(starpu_data_handle_t handle)
 {
 	struct starpu_task *task;

+ 1 - 0
tests/datawizard/user_interaction_implicit.c

@@ -39,6 +39,7 @@ struct data
 
 struct data buffers[NBUFFERS];
 
+static
 void callback_sync_data(void *arg)
 {
 	struct data *data = (struct data *) arg;

+ 3 - 1
tests/datawizard/write_only_tmp_buffer.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2009, 2010-2012  Université de Bordeaux 1
- * Copyright (C) 2010, 2011, 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -56,6 +56,7 @@ static void cuda_codelet_null(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args
 }
 #endif
 
+static
 void cpu_codelet_null(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args)
 {
 	char *buf = (char *)STARPU_VECTOR_GET_PTR(descr[0]);
@@ -63,6 +64,7 @@ void cpu_codelet_null(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args)
 	*buf = 42;
 }
 
+static
 void display_var(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args)
 {
 	STARPU_SKIP_IF_VALGRIND;

+ 1 - 0
tests/errorcheck/invalid_blocking_calls.c

@@ -24,6 +24,7 @@
 static starpu_data_handle_t handle;
 static unsigned *data;
 
+static
 void wrong_func(void *descr[], void *arg)
 {
 	/* The function is expected to fail. This is indicated in tests/Makefile.am */

+ 2 - 1
tests/helper/execute_on_all.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2009, 2010  Université de Bordeaux 1
- * Copyright (C) 2010, 2011, 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -22,6 +22,7 @@
 #include <stdlib.h>
 #include "../helper.h"
 
+static
 void func(void *arg)
 {
 	int *ptr = (int *) arg;

+ 2 - 1
tests/helper/starpu_create_sync_task.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2010  Université de Bordeaux 1
- * Copyright (C) 2010, 2011, 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -21,6 +21,7 @@
 
 #define NITER	10
 
+static
 void dummy_func(void *descr[] STARPU_ATTRIBUTE_UNUSED, void *arg STARPU_ATTRIBUTE_UNUSED)
 {
 }

+ 1 - 0
tests/main/codelet_null_callback.c

@@ -17,6 +17,7 @@
 #include <starpu.h>
 #include "../helper.h"
 
+static
 void callback(void *ptr)
 {
      int *x = (int *)ptr;

+ 1 - 0
tests/main/declare_deps_after_submission.c

@@ -27,6 +27,7 @@
   #define NLOOPS	128
 #endif
 
+static
 void dummy_func(void *descr[] STARPU_ATTRIBUTE_UNUSED, void *arg STARPU_ATTRIBUTE_UNUSED)
 {
 }

+ 1 - 0
tests/main/declare_deps_after_submission_synchronous.c

@@ -27,6 +27,7 @@
   #define NLOOPS	128
 #endif
 
+static
 void dummy_func(void *descr[] STARPU_ATTRIBUTE_UNUSED, void *arg STARPU_ATTRIBUTE_UNUSED)
 {
 }

+ 1 - 0
tests/main/declare_deps_in_callback.c

@@ -41,6 +41,7 @@ static void callback(void *arg)
 	STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_submit");
 }
 
+static
 void dummy_func(void *descr[] STARPU_ATTRIBUTE_UNUSED, void *arg STARPU_ATTRIBUTE_UNUSED)
 {
 }

+ 5 - 0
tests/main/deprecated_buffer.c

@@ -18,6 +18,7 @@
 #include <starpu.h>
 #include "../helper.h"
 
+static
 void cpu_codelet(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args)
 {
 	int *valin = (int *)STARPU_VARIABLE_GET_PTR(descr[0]);
@@ -43,6 +44,7 @@ struct starpu_codelet cl_without_mode =
 	.nbuffers = 2
 };
 
+static
 int submit_codelet_task_insert(struct starpu_codelet cl, starpu_data_handle_t handles0, starpu_data_handle_t handles1)
 {
 	int ret;
@@ -58,6 +60,7 @@ int submit_codelet_task_insert(struct starpu_codelet cl, starpu_data_handle_t ha
 	return 0;
 }
 
+static
 int submit_codelet_with_buffers(struct starpu_codelet cl, starpu_data_handle_t handles0, starpu_data_handle_t handles1)
 {
 	int ret;
@@ -78,6 +81,7 @@ int submit_codelet_with_buffers(struct starpu_codelet cl, starpu_data_handle_t h
 	return 0;
 }
 
+static
 int submit_codelet_with_handles(struct starpu_codelet cl, starpu_data_handle_t handles0, starpu_data_handle_t handles1)
 {
 	int ret;
@@ -102,6 +106,7 @@ struct submit_task_func
 	char *name;
 };
 
+static
 int submit_codelet(struct starpu_codelet cl, struct submit_task_func func)
 {
 	int *x, *y;

+ 3 - 0
tests/main/deprecated_func.c

@@ -18,6 +18,7 @@
 #include <starpu.h>
 #include "../helper.h"
 
+static
 void cpu_codelet(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args)
 {
 	int *valin = (int *)STARPU_VARIABLE_GET_PTR(descr[0]);
@@ -26,6 +27,7 @@ void cpu_codelet(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args)
 	*valout = *valin;
 }
 
+static
 void cpu2_codelet(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args)
 {
 	int *valin = (int *)STARPU_VARIABLE_GET_PTR(descr[0]);
@@ -68,6 +70,7 @@ struct starpu_codelet cl_cpu_func_funcs =
 	.name = "cpu_func_funcs",
 };
 
+static
 int submit_codelet(struct starpu_codelet cl, int where)
 {
 	int x=42, y=14;

+ 1 - 0
tests/main/empty_task_sync_point.c

@@ -29,6 +29,7 @@ static starpu_tag_t tagD = 0x3042;
 static starpu_tag_t tagE = 0x4042;
 static starpu_tag_t tagF = 0x5042;
 
+static
 void dummy_func(void *descr[] STARPU_ATTRIBUTE_UNUSED, void *arg STARPU_ATTRIBUTE_UNUSED)
 {
 }

+ 2 - 1
tests/main/empty_task_sync_point_tasks.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2010  Université de Bordeaux 1
- * Copyright (C) 2010, 2011, 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -18,6 +18,7 @@
 #include <starpu.h>
 #include "../helper.h"
 
+static
 void dummy_func(void *descr[] STARPU_ATTRIBUTE_UNUSED, void *arg STARPU_ATTRIBUTE_UNUSED)
 {
 }

+ 1 - 0
tests/main/execute_on_a_specific_worker.c

@@ -56,6 +56,7 @@ static void callback(void *arg)
 
 
 
+static
 void codelet_null(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args)
 {
 //	int id = starpu_worker_get_id();

+ 1 - 0
tests/main/get_current_task.c

@@ -28,6 +28,7 @@ static unsigned ntasks = 64;
 static unsigned ntasks = 65536;
 #endif
 
+static
 void check_task_func(void *descr[], void *arg)
 {
 }

+ 3 - 0
tests/main/insert_task.c

@@ -21,6 +21,7 @@
 static int _ifactor = 12;
 static float _ffactor = 10.0;
 
+static
 void func_cpu_args(void *descr[], void *_args)
 {
 	int *x0 = (int *)STARPU_VARIABLE_GET_PTR(descr[0]);
@@ -34,6 +35,7 @@ void func_cpu_args(void *descr[], void *_args)
         *x1 = *x1 * ffactor;
 }
 
+static
 void func_cpu_noargs(void *descr[], void *_args)
 {
 	int *x0 = (int *)STARPU_VARIABLE_GET_PTR(descr[0]);
@@ -59,6 +61,7 @@ struct starpu_codelet mycodelet_noargs =
         .nbuffers = 2
 };
 
+static
 int test_codelet(struct starpu_codelet *codelet, int task_insert, int args, int x, float f)
 {
         starpu_data_handle_t data_handles[2];

+ 1 - 0
tests/main/insert_task_array.c

@@ -18,6 +18,7 @@
 #include <starpu.h>
 #include "../helper.h"
 
+static
 void func_cpu(void *descr[], void *_args)
 {
 	int *x0 = (int *)STARPU_VARIABLE_GET_PTR(descr[0]);

+ 2 - 0
tests/main/multithreaded.c

@@ -32,6 +32,7 @@ static unsigned ntasks = 65536;
 #endif
 static unsigned nthreads = 2;
 
+static
 void dummy_func(void *descr[] STARPU_ATTRIBUTE_UNUSED, void *arg STARPU_ATTRIBUTE_UNUSED)
 {
 }
@@ -46,6 +47,7 @@ static struct starpu_codelet dummy_codelet =
 	.nbuffers = 0
 };
 
+static
 void *thread_func(void *arg STARPU_ATTRIBUTE_UNUSED)
 {
 	int ret;

+ 2 - 0
tests/main/multithreaded_init.c

@@ -24,6 +24,7 @@
 int *glob_argc;
 char ***glob_argv;
 
+static
 void *launch_starpu(void *unused)
 {
 	int ret;
@@ -35,6 +36,7 @@ void *launch_starpu(void *unused)
 	return NULL;
 }
 
+static
 void *shutdown_starpu(void *unused)
 {
 	(void) unused;

+ 3 - 1
tests/main/regenerate.c

@@ -33,7 +33,8 @@ static unsigned completed = 0;
 static starpu_pthread_mutex_t mutex = STARPU_PTHREAD_MUTEX_INITIALIZER;
 static starpu_pthread_cond_t cond = STARPU_PTHREAD_COND_INITIALIZER;
 
-static void callback(void *arg STARPU_ATTRIBUTE_UNUSED)
+static
+void callback(void *arg STARPU_ATTRIBUTE_UNUSED)
 {
 	struct starpu_task *task = starpu_task_get_current();
 
@@ -51,6 +52,7 @@ static void callback(void *arg STARPU_ATTRIBUTE_UNUSED)
 	}
 }
 
+static
 void dummy_func(void *descr[] STARPU_ATTRIBUTE_UNUSED, void *arg STARPU_ATTRIBUTE_UNUSED)
 {
 }

+ 1 - 0
tests/main/starpu_task_bundle.c

@@ -21,6 +21,7 @@
 #define NB_BUNDLE 10
 #define NB_ITERATION 5
 
+static
 void func_cpu(void *descr[], void *args)
 {
 	float *x = (float *) STARPU_VARIABLE_GET_PTR(descr[0]);

+ 1 - 0
tests/main/starpu_task_wait.c

@@ -28,6 +28,7 @@ static unsigned ntasks = 64;
 static unsigned ntasks = 65536;
 #endif
 
+static
 void dummy_func(void *descr[] STARPU_ATTRIBUTE_UNUSED, void *arg STARPU_ATTRIBUTE_UNUSED)
 {
 }

+ 1 - 0
tests/main/starpu_task_wait_for_all.c

@@ -27,6 +27,7 @@ static unsigned ntasks = 64;
 static unsigned ntasks = 65536;
 #endif
 
+static
 void dummy_func(void *descr[], void *arg)
 {
 }

+ 1 - 0
tests/main/starpu_worker_exists.c

@@ -40,6 +40,7 @@ static int can_never_execute(unsigned workerid,
 	return 0;
 }
 
+static
 void fake(void *buffers[], void *args)
 {
 	(void) buffers;

+ 2 - 1
tests/main/static_restartable.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2009, 2010-2011  Université de Bordeaux 1
- * Copyright (C) 2010, 2011, 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -28,6 +28,7 @@ static unsigned ntasks = 64;
 static unsigned ntasks = 65536;
 #endif
 
+static
 void dummy_func(void *descr[] STARPU_ATTRIBUTE_UNUSED, void *arg STARPU_ATTRIBUTE_UNUSED)
 {
 }

+ 2 - 1
tests/main/static_restartable_tag.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2009, 2010-2012  Université de Bordeaux 1
- * Copyright (C) 2010, 2011, 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
  * Copyright (C) 2012 inria
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -30,6 +30,7 @@ static unsigned ntasks = 65536;
 #endif
 static starpu_tag_t tag = 0x32;
 
+static
 void dummy_func(void *descr[] STARPU_ATTRIBUTE_UNUSED, void *arg STARPU_ATTRIBUTE_UNUSED)
 {
 }

+ 2 - 1
tests/main/static_restartable_using_initializer.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2009, 2010-2011  Université de Bordeaux 1
- * Copyright (C) 2010, 2011, 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -31,6 +31,7 @@ static unsigned ntasks = 64;
 static unsigned ntasks = 65536;
 #endif
 
+static
 void dummy_func(void *descr[] STARPU_ATTRIBUTE_UNUSED, void *arg STARPU_ATTRIBUTE_UNUSED)
 {
 }

+ 1 - 0
tests/main/subgraph_repeat.c

@@ -51,6 +51,7 @@ static starpu_pthread_mutex_t mutex = STARPU_PTHREAD_MUTEX_INITIALIZER;
 
 extern void cuda_host_increment(void *descr[], void *_args);
 
+static
 void cpu_increment(void *descr[], void *arg STARPU_ATTRIBUTE_UNUSED)
 {
 	unsigned *var = (unsigned *)STARPU_VARIABLE_GET_PTR(descr[0]);

+ 1 - 0
tests/main/subgraph_repeat_regenerate_tag.c

@@ -57,6 +57,7 @@ static starpu_pthread_mutex_t mutex = STARPU_PTHREAD_MUTEX_INITIALIZER;
 
 extern void cuda_host_increment(void *descr[], void *_args);
 
+static
 void cpu_increment(void *descr[], void *arg STARPU_ATTRIBUTE_UNUSED)
 {
 	unsigned *var = (unsigned *)STARPU_VARIABLE_GET_PTR(descr[0]);

+ 1 - 0
tests/main/subgraph_repeat_tag.c

@@ -50,6 +50,7 @@ static starpu_pthread_mutex_t mutex = STARPU_PTHREAD_MUTEX_INITIALIZER;
 
 extern void cuda_host_increment(void *descr[], void *_args);
 
+static
 void cpu_increment(void *descr[], void *arg STARPU_ATTRIBUTE_UNUSED)
 {
 	unsigned *var = (unsigned *)STARPU_VARIABLE_GET_PTR(descr[0]);

+ 1 - 0
tests/main/tag_wait_api.c

@@ -21,6 +21,7 @@
 #include <starpu.h>
 #include "../helper.h"
 
+static
 void dummy_func(void *descr[] STARPU_ATTRIBUTE_UNUSED, void *arg STARPU_ATTRIBUTE_UNUSED)
 {
 }

+ 1 - 0
tests/main/task_wait_api.c

@@ -21,6 +21,7 @@
 #include <starpu.h>
 #include "../helper.h"
 
+static
 void dummy_func(void *descr[] STARPU_ATTRIBUTE_UNUSED, void *arg STARPU_ATTRIBUTE_UNUSED)
 {
 }

+ 1 - 0
tests/main/wait_all_regenerable_tasks.c

@@ -39,6 +39,7 @@ static void callback(void *arg)
 		task->regenerate = 0;
 }
 
+static
 void dummy_func(void *descr[] STARPU_ATTRIBUTE_UNUSED, void *arg STARPU_ATTRIBUTE_UNUSED)
 {
 }

+ 1 - 0
tests/microbenchs/async_tasks_overhead.c

@@ -29,6 +29,7 @@ static double cumulated = 0.0;
 static double cumulated_push = 0.0;
 static double cumulated_pop = 0.0;
 
+static
 void dummy_func(void *descr[] STARPU_ATTRIBUTE_UNUSED, void *arg STARPU_ATTRIBUTE_UNUSED)
 {
 }

+ 6 - 0
tests/microbenchs/matrix_as_vector.c

@@ -24,6 +24,7 @@
 
 #define LOOPS 100
 
+static
 void vector_cpu_func(void *descr[], void *cl_arg STARPU_ATTRIBUTE_UNUSED)
 {
 	STARPU_SKIP_IF_VALGRIND;
@@ -37,6 +38,7 @@ void vector_cpu_func(void *descr[], void *cl_arg STARPU_ATTRIBUTE_UNUSED)
 	matrix[0] = sum/nx;
 }
 
+static
 void vector_cuda_func(void *descr[], void *cl_arg STARPU_ATTRIBUTE_UNUSED)
 {
 #ifdef STARPU_USE_CUDA
@@ -53,6 +55,7 @@ void vector_cuda_func(void *descr[], void *cl_arg STARPU_ATTRIBUTE_UNUSED)
 #endif /* STARPU_USE_CUDA */
 }
 
+static
 void matrix_cpu_func(void *descr[], void *cl_arg STARPU_ATTRIBUTE_UNUSED)
 {
 	STARPU_SKIP_IF_VALGRIND;
@@ -67,6 +70,7 @@ void matrix_cpu_func(void *descr[], void *cl_arg STARPU_ATTRIBUTE_UNUSED)
 	matrix[0] = sum / (nx*ny);
 }
 
+static
 void matrix_cuda_func(void *descr[], void *cl_arg STARPU_ATTRIBUTE_UNUSED)
 {
 #ifdef STARPU_USE_CUDA
@@ -84,6 +88,7 @@ void matrix_cuda_func(void *descr[], void *cl_arg STARPU_ATTRIBUTE_UNUSED)
 #endif /* STARPU_USE_CUDA */
 }
 
+static
 int check_size(int nx, struct starpu_codelet *vector_codelet, struct starpu_codelet *matrix_codelet, char *device_name)
 {
 	float *matrix, mean;
@@ -163,6 +168,7 @@ end:
 #define NX_MIN 1024
 #define NX_MAX 1024*1024
 
+static
 int check_size_on_device(uint32_t where, char *device_name)
 {
 	int nx, ret;

+ 3 - 1
tests/microbenchs/prefetch_data_on_node.c

@@ -33,13 +33,15 @@
 starpu_data_handle_t v_handle;
 static unsigned *v;
 
-static void callback(void *arg)
+static
+void callback(void *arg)
 {
 	unsigned node = (unsigned)(uintptr_t) arg;
 
 	starpu_data_prefetch_on_node(v_handle, node, 1);
 }
 
+static
 void codelet_null(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args)
 {
 //	fprintf(stderr, "pif\n");

+ 8 - 4
tests/microbenchs/redundant_buffer.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2009, 2010  Université de Bordeaux 1
- * Copyright (C) 2010, 2011, 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -29,19 +29,23 @@
 starpu_data_handle_t v_handle;
 static unsigned *v;
 
-static void opencl_codelet_null(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args)
+static
+void opencl_codelet_null(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args)
 {
 }
 
-static void cuda_codelet_null(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args)
+static
+void cuda_codelet_null(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args)
 {
 }
 
+static
 void cpu_codelet_null(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args)
 {
 }
 
-static struct starpu_codelet cl =
+static
+struct starpu_codelet cl =
 {
 	.cpu_funcs = {cpu_codelet_null, NULL},
 	.cuda_funcs = {cuda_codelet_null, NULL},

+ 2 - 0
tests/microbenchs/sync_tasks_overhead.c

@@ -24,6 +24,7 @@
 
 static unsigned ntasks = 65536;
 
+static
 void dummy_func(void *descr[] STARPU_ATTRIBUTE_UNUSED, void *arg STARPU_ATTRIBUTE_UNUSED)
 {
 }
@@ -38,6 +39,7 @@ static struct starpu_codelet dummy_codelet =
 	.nbuffers = 0
 };
 
+static
 int inject_one_task(void)
 {
 	int ret;

+ 2 - 0
tests/microbenchs/tasks_overhead.c

@@ -34,6 +34,7 @@ static unsigned nbuffers = 0;
 
 struct starpu_task *tasks;
 
+static
 void dummy_func(void *descr[] STARPU_ATTRIBUTE_UNUSED, void *arg STARPU_ATTRIBUTE_UNUSED)
 {
 }
@@ -49,6 +50,7 @@ static struct starpu_codelet dummy_codelet =
 	.modes = {STARPU_RW, STARPU_RW, STARPU_RW, STARPU_RW, STARPU_RW, STARPU_RW, STARPU_RW, STARPU_RW}
 };
 
+static
 int inject_one_task(void)
 {
 	struct starpu_task *task = starpu_task_create();

+ 1 - 0
tests/overlap/overlap.c

@@ -54,6 +54,7 @@ static void callback(void *arg)
 	}
 }
 
+static
 void codelet_sleep(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args)
 {
 	STARPU_SKIP_IF_VALGRIND;

+ 2 - 1
tests/parallel_tasks/explicit_combined_worker.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2010, 2012  Université de Bordeaux 1
- * Copyright (C) 2010, 2011, 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -24,6 +24,7 @@
 #define N	1000
 #define VECTORSIZE	1024
 
+static
 void codelet_null(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args)
 {
 	STARPU_SKIP_IF_VALGRIND;

+ 2 - 1
tests/parallel_tasks/parallel_kernels.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2010, 2012  Université de Bordeaux 1
- * Copyright (C) 2010, 2011, 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -24,6 +24,7 @@
 #define N	1000
 #define VECTORSIZE	1024
 
+static
 void codelet_null(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args)
 {
 	STARPU_SKIP_IF_VALGRIND;

+ 2 - 1
tests/parallel_tasks/parallel_kernels_spmd.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2010, 2012  Université de Bordeaux 1
- * Copyright (C) 2010, 2011, 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -24,6 +24,7 @@
 #define N	1000
 #define VECTORSIZE	1024
 
+static
 void codelet_null(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args)
 {
 	STARPU_SKIP_IF_VALGRIND;

+ 2 - 1
tests/parallel_tasks/spmd_peager.c

@@ -26,6 +26,7 @@
 starpu_data_handle_t v_handle;
 static unsigned *v;
 
+static
 void codelet_null(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args)
 {
 	STARPU_SKIP_IF_VALGRIND;
@@ -82,7 +83,7 @@ int main(int argc, char **argv)
 
 		task->handles[0] = v_handle;
 
-		int ret = starpu_task_submit(task);
+		ret = starpu_task_submit(task);
 		if (ret == -ENODEV) goto enodev;
 		STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_submit");
 	}

+ 2 - 1
tests/perfmodels/non_linear_regression_based.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2011-2012  Université de Bordeaux 1
- * Copyright (C) 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2012, 2013  Centre National de la Recherche Scientifique
  * Copyright (C) 2012 inria
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -33,6 +33,7 @@ static void memset_cuda(void *descr[], void *arg)
 }
 #endif
 
+static
 void memset_cpu(void *descr[], void *arg)
 {
 	STARPU_SKIP_IF_VALGRIND;

+ 1 - 0
tests/perfmodels/regression_based.c

@@ -38,6 +38,7 @@ static void memset_cuda(void *descr[], void *arg)
 extern void memset_opencl(void *buffers[], void *args);
 #endif
 
+static
 void memset_cpu(void *descr[], void *arg)
 {
 	STARPU_SKIP_IF_VALGRIND;

+ 1 - 0
tests/perfmodels/value_nan.c

@@ -26,6 +26,7 @@
 
 #define STRING "booh"
 
+static
 int _check_number(double val, int checknan)
 {
 	char *tmp = "starpu_XXXXXX";

+ 2 - 2
tests/sched_policies/execute_all_tasks.c

@@ -26,8 +26,8 @@
 
 #define NTASKS           8
 
-void
-dummy(void *buffers[], void *args)
+static
+void dummy(void *buffers[], void *args)
 {
 	(void) buffers;
 	(void) args;