[FIX] missing prototypes: add missing "void" 10/14610/5
authorNikita Kalyazin <nkalyazin@gmail.com>
Wed, 1 Jan 2014 19:12:21 +0000 (23:12 +0400)
committerNikita Kalyazin <nkalyazin@gmail.com>
Sat, 18 Jan 2014 10:59:40 +0000 (14:59 +0400)
Change-Id: I08a7becd2d467ae42538380787dd9daa57c840ad
Signed-off-by: Nikita Kalyazin <nkalyazin@gmail.com>
daemon/da_debug.c
daemon/da_inst.c
daemon/da_inst.h
daemon/daemon.c
daemon/daemon.h
daemon/sys_stat.c
daemon/sys_stat.h
daemon/threads.c
daemon/transfer_thread.c
daemon/transfer_thread.h

index b98aab8..420ebc2 100644 (file)
@@ -46,7 +46,7 @@ static inline void close_on_exec_dup(int old, int new)
        fcntl(new, F_SETFD, fcntl(new, F_GETFD) | FD_CLOEXEC);
 }
 
-void initialize_log()
+void initialize_log(void)
 {
        int fd = open(DEBUG_LOGFILE, O_WRONLY | O_CREAT | O_TRUNC, 0777);
        if (fd > 0) {
@@ -63,7 +63,7 @@ void initialize_log()
 }
 
 #else
-void initialize_log()
+void initialize_log(void)
 {
 }
 #endif
index 2389535..99f19ac 100644 (file)
@@ -108,7 +108,7 @@ static int data_list_make_hash(struct data_list_t *what)
 }
 
 //------------ create - destroy
-struct data_list_t *new_data()
+struct data_list_t *new_data(void)
 {
        struct data_list_t *lib = malloc(sizeof(*lib));
        lib->next = NULL;
@@ -119,7 +119,7 @@ struct data_list_t *new_data()
        return lib;
 }
 
-struct lib_list_t *new_lib()
+struct lib_list_t *new_lib(void)
 {
        struct lib_list_t *lib = (struct lib_list_t *)new_data();
        lib->lib = malloc(sizeof(*lib->lib));
@@ -127,7 +127,7 @@ struct lib_list_t *new_lib()
        return lib;
 }
 
-struct app_list_t *new_app()
+struct app_list_t *new_app(void)
 {
        struct app_list_t *app = (struct app_list_t *)new_data();
        app->app = malloc(sizeof(*app->app));
@@ -135,7 +135,7 @@ struct app_list_t *new_app()
        return app;
 }
 
-struct probe_list_t *new_probe()
+struct probe_list_t *new_probe(void)
 {
        struct probe_list_t *probe = malloc(sizeof(*probe));
        probe->next = NULL;
index ce20510..81d4e61 100644 (file)
@@ -80,9 +80,9 @@ extern int msg_swap_inst_add(struct msg_buf_t *data, struct user_space_inst_t *u
 extern int msg_start(struct msg_buf_t *data, struct user_space_inst_t *us_inst,
                     struct msg_t **msg, enum ErrorCode *err);
 
-struct probe_list_t *new_probe();
-struct lib_list_t *new_lib();
-struct app_list_t *new_app();
+struct probe_list_t *new_probe(void);
+struct lib_list_t *new_lib(void);
+struct app_list_t *new_app(void);
 int probe_list_append(struct data_list_t *to, struct probe_list_t *from);
 int data_list_append(struct data_list_t **to, struct data_list_t *from);
 void free_data_list(struct data_list_t **data);
index 0f0412c..13e9ff7 100644 (file)
@@ -71,7 +71,7 @@
 #define MAX_APP_LAUNCH_TIME            60
 #define MAX_CONNECT_TIMEOUT_TIME       5*60
 
-uint64_t get_total_alloc_size()
+uint64_t get_total_alloc_size(void)
 {
        int i;
        uint64_t allocsize = 0;
@@ -337,7 +337,7 @@ static Eina_Bool connect_timer_cb(void *data, Ecore_Fd_Handler *fd_handler)
        return ECORE_CALLBACK_CANCEL;
 }
 
-int launch_timer_start()
+static int launch_timer_start(void)
 {
        int res = 0;
 
@@ -376,7 +376,7 @@ int launch_timer_start()
        return res;
 }
 
-int prepare_profiling()
+int prepare_profiling(void)
 {
        struct app_list_t *app = NULL;
        const struct app_info_t *app_info = NULL;
@@ -402,7 +402,7 @@ int prepare_profiling()
 
 }
 
-int start_profiling()
+int start_profiling(void)
 {
        struct app_list_t *app = NULL;
        const struct app_info_t *app_info = NULL;
@@ -876,7 +876,7 @@ static bool initialize_events(void)
 }
 
 // return 0 for normal case
-int daemonLoop()
+int daemonLoop(void)
 {
        int return_value = 0;
 
index cbefc1b..c7a5c85 100644 (file)
@@ -191,25 +191,25 @@ typedef struct
 
 extern __da_manager manager;
 
-void initialize_log();
-int daemonLoop();
-uint64_t get_total_alloc_size();
+uint64_t get_total_alloc_size(void);
+void initialize_log(void);
+int daemonLoop(void);
 void unlink_portfile(void);
 
 int makeRecvThread(int index);
-int samplingStart();
-int samplingStop();
+int samplingStart(void);
+int samplingStop(void);
 
 
 
 
 // TODO maybe need move to other file
-int prepare_profiling();
-int start_profiling();
-void stop_profiling();
+int prepare_profiling(void);
+int start_profiling(void);
+void stop_profiling(void);
 int reconfigure();
 int sendACKCodeToHost(enum HostMessageType resp, int msgcode);
-void terminate_all();
+void terminate_all(void);
 
 #ifdef __cplusplus
 }
index 977b01a..34ad783 100644 (file)
@@ -2431,7 +2431,7 @@ fail_exit:
        return -1;
 }
 
-int initialize_system_info()
+int initialize_system_info(void)
 {
        int i;
 
@@ -2461,7 +2461,7 @@ int initialize_system_info()
        return 0;
 }
 
-int finalize_system_info()
+int finalize_system_info(void)
 {
        int i;
 
@@ -2498,7 +2498,7 @@ static void ftest_and_close(FILE **fd)
 #define str(x) strr(x)
 #define dtest_and_close(fd) do {LOGI("CLOSE " str(fd) "\n");test_and_close(fd);} while(0)
 #define dftest_and_close(fd) do {LOGI("CLOSE " str(fd) "\n");ftest_and_close(fd);} while(0)
-void close_system_file_descriptors()
+void close_system_file_descriptors(void)
 {
        dtest_and_close(&manager.fd.brightness);
        dtest_and_close(&manager.fd.voltage);
@@ -2510,7 +2510,7 @@ void close_system_file_descriptors()
        dftest_and_close(&manager.fd.diskstats);
 }
 
-int init_system_file_descriptors()
+int init_system_file_descriptors(void)
 {
        //inits
        init_brightness_status();
index e94b37c..a5acecb 100644 (file)
@@ -155,14 +155,14 @@ int get_device_info(char* buffer, int buffer_len);
 
 int get_file_status(int* pfd, const char* filename);
 
-int initialize_system_info();
+int initialize_system_info(void);
 
-int finalize_system_info();
+int finalize_system_info(void);
 
 int fill_target_info(struct target_info_t *target_info);
 
-int init_system_file_descriptors();
-void close_system_file_descriptors();
+int init_system_file_descriptors(void);
+void close_system_file_descriptors(void);
 int sys_stat_prepare(void);
 #ifdef __cplusplus
 }
index 9d5c5d4..5ff2843 100644 (file)
@@ -292,7 +292,7 @@ void* samplingThread(void* data)
 // return 0 if normal case
 // return minus value if critical error
 // return plus value if non-critical error
-int samplingStart()
+int samplingStart(void)
 {
        struct itimerval timerval;
        time_t sec = prof_session.conf.system_trace_period / 1000;
@@ -322,7 +322,7 @@ int samplingStart()
        return 0;
 }
 
-int samplingStop()
+int samplingStop(void)
 {
        if(manager.sampling_thread != -1)
        {
index 9e048f1..a2ab5bb 100644 (file)
@@ -101,7 +101,7 @@ static void *transfer_thread(void *arg)
        return NULL;
 }
 
-int start_transfer()
+int start_transfer(void)
 {
        int saved_flags;
 
@@ -130,7 +130,7 @@ int start_transfer()
        return 0;
 }
 
-void stop_transfer()
+void stop_transfer(void)
 {
        int saved_flags;
        int ret = 0;
index fa6995e..55e44a0 100644 (file)
@@ -29,7 +29,7 @@
 #ifndef _TRANSFER_THREAD_
 #define _TRANSFER_THREAD_
 
-int start_transfer();
-void stop_transfer();
+int start_transfer(void);
+void stop_transfer(void);
 
 #endif /* _TRANSFER_THREAD_ */