소스 검색

Fix non-ANSI function declarations found using smatch.

Cyril Roelandt 12 년 전
부모
커밋
d2d9ce97ca

+ 1 - 1
examples/basic_examples/multiformat.c

@@ -253,7 +253,7 @@ struct starpu_opencl_program opencl_conversion_program;
 #endif
 
 static int
-gpus_available()
+gpus_available(void)
 {
 #ifdef STARPU_USE_CUDA
 	if (ncuda > 0)

+ 1 - 1
src/common/fxt.c

@@ -44,7 +44,7 @@ static int _starpu_written = 0;
 
 static int _starpu_id;
 
-long _starpu_gettid()
+long _starpu_gettid(void)
 {
 #if defined(__linux__)
 	return syscall(SYS_gettid);

+ 1 - 1
src/common/utils.c

@@ -119,7 +119,7 @@ int _starpu_check_mutex_deadlock(pthread_mutex_t *mutex)
 	return 1;
 }
 
-char *_starpu_get_home_path()
+char *_starpu_get_home_path(void)
 {
 	char *path = getenv("XDG_CACHE_HOME");
 	if (!path)

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

@@ -1212,7 +1212,7 @@ static void get_config_path(char *path, size_t maxlen)
 	get_bus_path("config", path, maxlen);
 }
 
-static void check_bus_config_file()
+static void check_bus_config_file(void)
 {
         int res;
         char path[256];
@@ -1298,7 +1298,7 @@ static void write_bus_config_file_content(void)
         fclose(f);
 }
 
-static void generate_bus_config_file()
+static void generate_bus_config_file(void)
 {
 	if (!was_benchmarked)
 		benchmark_all_gpu_devices();

+ 3 - 3
src/core/workers.c

@@ -894,17 +894,17 @@ unsigned starpu_spu_worker_get_count(void)
 	return config.topology.ngordon_spus;
 }
 
-int starpu_asynchronous_copy_disabled()
+int starpu_asynchronous_copy_disabled(void)
 {
 	return config.conf->disable_asynchronous_copy;
 }
 
-int starpu_asynchronous_cuda_copy_disabled()
+int starpu_asynchronous_cuda_copy_disabled(void)
 {
 	return config.conf->disable_cuda_asynchronous_copy;
 }
 
-int starpu_asynchronous_opencl_copy_disabled()
+int starpu_asynchronous_opencl_copy_disabled(void)
 {
 	return config.conf->disable_opencl_asynchronous_copy;
 }

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

@@ -37,7 +37,7 @@ static struct handle_entry *registered_handles;
 static struct _starpu_spinlock    registered_handles_lock;
 static int _data_interface_number = STARPU_MAX_INTERFACE_ID;
 
-void _starpu_data_interface_init()
+void _starpu_data_interface_init(void)
 {
 	_starpu_spin_init(&registered_handles_lock);
 }
@@ -673,7 +673,7 @@ void *starpu_data_get_interface_on_node(starpu_data_handle_t handle, unsigned me
 	return handle->per_node[memory_node].data_interface;
 }
 
-int starpu_data_interface_get_next_id()
+int starpu_data_interface_get_next_id(void)
 {
 	_data_interface_number += 1;
 	return _data_interface_number-1;

+ 7 - 7
src/top/starpu_top.c

@@ -42,13 +42,13 @@ sem_t starpu_top_wait_for_go;
 pthread_mutex_t starpu_top_wait_for_continue_mutex;
 pthread_cond_t starpu_top_wait_for_continue_cond = PTHREAD_COND_INITIALIZER;
 
-int _starpu_top_status_get()
+int _starpu_top_status_get(void)
 {
 	return starpu_top;
 }
 
 static
-unsigned long long current_timestamp();
+unsigned long long current_timestamp(void);
 
 /*********************************************
 *****************INIT FUNC********************
@@ -65,7 +65,7 @@ char *message_for_topparam_init(struct starpu_top_param* param);
  * running
  */
 static
-void copy_data_and_param()
+void copy_data_and_param(void)
 {
 	printf("%s:%d trace\n", __FILE__, __LINE__);
 	//copying datas
@@ -107,7 +107,7 @@ static void starpu_top_get_device_type(int id, char* type)
 	}
 }
 
-static void starpu_top_send_devices_info()
+static void starpu_top_send_devices_info(void)
 {
 	char* message=(char *)malloc(5*sizeof(char));
 	snprintf(message,5,"DEV\n");
@@ -629,7 +629,7 @@ void starpu_top_debug_lock(const char* debug_message)
  **************TIME FUNCTION****************
  *******************************************/
 
-unsigned long long current_timestamp()
+unsigned long long current_timestamp(void)
 {
 	struct timespec now;
 	_starpu_clock_gettime(&now);
@@ -665,7 +665,7 @@ enum starpu_top_message_type starpu_top_get_message_type(const char* message)
 }
 
 static
-void starpu_top_unlock_starpu()
+void starpu_top_unlock_starpu(void)
 {
 	sem_post(&starpu_top_wait_for_go);
 	printf("%s:%d starpu started\n", __FILE__, __LINE__);
@@ -739,7 +739,7 @@ void starpu_top_change_debug_mode(const char*message)
  * Unlock starpu if it was locked in debug state
 */
 static
-void starpu_top_debug_next_step()
+void starpu_top_debug_next_step(void)
 {
 	_STARPU_PTHREAD_COND_SIGNAL(&starpu_top_wait_for_continue_cond);
 }

+ 1 - 1
src/top/starpu_top_connection.c

@@ -97,7 +97,7 @@ void * message_to_ui(void * p)
 	return NULL;
 }
 
-void _starpu_top_communications_threads_launcher()
+void _starpu_top_communications_threads_launcher(void)
 {
 	pthread_t from_ui;
 	pthread_t to_ui;

+ 1 - 1
tests/datawizard/acquire_release.c

@@ -56,7 +56,7 @@ static struct starpu_codelet increment_cl =
 unsigned token = 0;
 starpu_data_handle_t token_handle;
 
-int increment_token()
+int increment_token(void)
 {
 	int ret;
 	struct starpu_task *task = starpu_task_create();

+ 2 - 2
tests/datawizard/data_lookup.c

@@ -43,7 +43,7 @@ static struct starpu_codelet cl =
 	.modes = {STARPU_W}
 };
 
-static int test_lazy_allocation()
+static int test_lazy_allocation(void)
 {
 	static const size_t count = 123;
 
@@ -94,7 +94,7 @@ static int test_lazy_allocation()
 
 #define VECTOR_SIZE     123
 
-static void test_filters()
+static void test_filters(void)
 {
 #define CHILDREN_COUNT 10
 	int ret, i;

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

@@ -441,7 +441,7 @@ cuda_to_ram(void)
 
 #ifdef STARPU_USE_OPENCL
 static enum exit_code
-ram_to_opencl()
+ram_to_opencl(void)
 {
 	int err;
 	struct starpu_task *task;
@@ -459,7 +459,7 @@ ram_to_opencl()
 }
 
 static enum exit_code
-opencl_to_ram()
+opencl_to_ram(void)
 {
 	int err;
 	struct starpu_task *task;