[FIX] missing prototypes: add "static" 13/14613/6
authorNikita Kalyazin <nkalyazin@gmail.com>
Wed, 1 Jan 2014 19:14:17 +0000 (23:14 +0400)
committerNikita Kalyazin <nkalyazin@gmail.com>
Sat, 18 Jan 2014 10:59:40 +0000 (14:59 +0400)
Change-Id: I40858b95d6b499e63cb6d77765b7a462cac6febe
Signed-off-by: Nikita Kalyazin <nkalyazin@gmail.com>
daemon/da_inst.c
daemon/da_protocol.c
daemon/da_protocol_inst.c
daemon/daemon.c
daemon/elf.c
daemon/main.c
daemon/sys_stat.c
daemon/threads.c
daemon/utils.c

index 99f19ac8c9153c10c8736cb41fff63c273f6f90b..d0dda0a89fc069ca46f1bf42ab5a724f4d9adb7a 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(void)
+static struct data_list_t *new_data(void)
 {
        struct data_list_t *lib = malloc(sizeof(*lib));
        lib->next = NULL;
@@ -166,7 +166,7 @@ static void free_probe_list(struct probe_list_t *probe)
        }
 }
 
-void free_data(struct data_list_t *lib)
+static void free_data(struct data_list_t *lib)
 {
        free_probe_list(lib->list);
        free_data_element(lib);
index 4dd652ea3c38f00caf82ddddd8f9613dd1aa60b0..76048059d592c27823dfd9b5a36458cdfbe49cf1 100644 (file)
@@ -55,7 +55,7 @@
 
 static pthread_mutex_t stop_all_mutex = PTHREAD_MUTEX_INITIALIZER;
 
-void inline free_msg(struct msg_t *msg)
+static void inline free_msg(struct msg_t *msg)
 {
        free(msg);
 }
@@ -150,7 +150,7 @@ static char *msgErrStr(enum ErrorCode err)
                to+=strlen( dstr(f) delim );    \
        }
 #define print_feature_0(f) print_feature(f, feature0, to, ", \n\t")
-void feature_code_str(uint64_t feature0, uint64_t feature1, char *to)
+static void feature_code_str(uint64_t feature0, uint64_t feature1, char *to)
 {
        print_feature_0(FL_CPU);
        print_feature_0(FL_MEMORY);
@@ -181,12 +181,12 @@ void feature_code_str(uint64_t feature0, uint64_t feature1, char *to)
 
 
 //PARSE FUNCTIONS
-inline uint32_t get_avail_msg_size(struct msg_buf_t *msg)
+static inline uint32_t get_avail_msg_size(struct msg_buf_t *msg)
 {
        return (uint32_t)(msg->end - msg->cur_pos);
 }
 
-inline uint32_t get_msg_cur_size(struct msg_buf_t *msg)
+static inline uint32_t get_msg_cur_size(struct msg_buf_t *msg)
 {
        return (uint32_t) (msg->cur_pos - msg->payload);
 }
@@ -767,7 +767,7 @@ int sendACKToHost(enum HostMessageT resp, enum ErrorCode err_code,
                return 1;
 }
 
-struct msg_t *gen_stop_msg(void)
+static struct msg_t *gen_stop_msg(void)
 {
        struct msg_t *res = malloc(sizeof(*res));
        memset(res, 0, sizeof(*res));
@@ -1027,7 +1027,7 @@ send_ack:
        return -(err_code != ERR_NO);
 }
 
-int process_msg_get_screenshot(struct msg_buf_t *msg_control)
+static int process_msg_get_screenshot(struct msg_buf_t *msg_control)
 {
        int target_index;
        int sock;
index 3af23c14e3f6373b46309172e9c31365dbc0c6b5..32bf7552196c57ebbe5c65c9e75b13fb2be81954 100644 (file)
@@ -56,7 +56,7 @@ static uint32_t calc_app_hash(struct app_info_t *app)
 
 
 //----------------------------------- parse -----------------------------------
-int parse_us_inst_func(struct msg_buf_t *msg, struct probe_list_t **dest)
+static int parse_us_inst_func(struct msg_buf_t *msg, struct probe_list_t **dest)
 {
        //probe format
        //name       | type   | len       | info
@@ -109,7 +109,7 @@ err_ret:
        return 0;
 }
 
-int parse_func_inst_list(struct msg_buf_t *msg,
+static int parse_func_inst_list(struct msg_buf_t *msg,
                                struct data_list_t *dest)
 {
        uint32_t i = 0, num = 0;
@@ -137,7 +137,7 @@ int parse_func_inst_list(struct msg_buf_t *msg,
        return 1;
 }
 
-int parse_inst_lib(struct msg_buf_t *msg, struct lib_list_t **dest)
+static int parse_inst_lib(struct msg_buf_t *msg, struct lib_list_t **dest)
 {
        *dest = new_lib();
        if (*dest == NULL) {
index 13e9ff71a4ef6ccbe54c71e34c9c123eb8c8df52..9d242205768056dbb475952f2e38867162384fc9 100644 (file)
@@ -196,7 +196,7 @@ static inline int get_apps_to_run()
        return manager.apps_to_run;
 }
 
-int kill_app_by_info(const struct app_info_t *app_info)
+static int kill_app_by_info(const struct app_info_t *app_info)
 {
        int res = 0;
 
index d6e22e9a32fdac69fd960b7cd8669aa8a05c876d..9c9dc1f5a5d64f76e0f169efafb82cd19181d29c 100644 (file)
@@ -131,7 +131,7 @@ static bool exist(const char *filename)
        return stat(filename, &decoy) == 0;
 }
 
-void suffix_filename(char buf[PATH_MAX], const char *filename)
+static void suffix_filename(char buf[PATH_MAX], const char *filename)
 {
        char adj_filename[PATH_MAX];
        sprintf(adj_filename, "%s.exe", filename);
index 6a8ef2a1f532a496710b7553ebcb2fa0b49a5e15..9e97717dc175fe1b482d18d078998515efc9f468 100644 (file)
@@ -109,7 +109,7 @@ static void write_int(FILE *fp, int code)
 // atexit functions
 // =============================================================================
 
-void _close_server_socket(void)
+static void _close_server_socket(void)
 {
        LOGI("close_server_socket\n");
        // close server socket
index 34ad783913db68fe8c0b61ce629f702f2e87a946..78fb2c42500c2e6eaec1f33b768851fd1142ef54 100644 (file)
@@ -106,7 +106,7 @@ static CPU_t* cpus = NULL;
 static unsigned long probe_so_size = 0;
 
 
-int get_file_status_no_open(int pfd, const char *filename)
+static int get_file_status_no_open(int pfd, const char *filename)
 {
        int status = 0;
        char buf[STATUS_STRING_MAX];
@@ -1112,7 +1112,7 @@ static int update_system_memory_data(uint64_t *memtotal, uint64_t *memused)
 // return 0 for error case
 // return system total memory in MB
 //static
-unsigned long get_system_total_memory()
+static unsigned long get_system_total_memory(void)
 {
        int meminfo_fd = manager.fd.procmeminfo;
        char *head, *tail;
@@ -1460,7 +1460,7 @@ static void get_app_info(const char* binary_path, char* width,
        close(fd);
 }
 */
-int get_camera_count()
+static int get_camera_count(void)
 {
        FILE* fp;
        int count = 0;
@@ -1580,7 +1580,7 @@ int get_device_info(char* buffer, int buffer_len)
        return res;
 }
 
-int update_cpus_info(int event_num, float elapsed)
+static int update_cpus_info(int event_num, float elapsed)
 {
        int i = 0;
        CPU_t* cpuptr;
@@ -1698,7 +1698,7 @@ int update_cpus_info(int event_num, float elapsed)
        return 0;
 }
 
-int fill_system_processes_info(float factor, struct system_info_t * sys_info)
+static int fill_system_processes_info(float factor, struct system_info_t * sys_info)
 {
        procNode* proc;
        int i = 0;
@@ -1776,7 +1776,7 @@ int fill_system_processes_info(float factor, struct system_info_t * sys_info)
 }
 
 // fill threads information
-int fill_system_threads_info(float factor, struct system_info_t * sys_info)
+static int fill_system_threads_info(float factor, struct system_info_t * sys_info)
 {
        procNode* proc;
        float thread_load;
@@ -1816,7 +1816,7 @@ int fill_system_threads_info(float factor, struct system_info_t * sys_info)
 }
 
 //fill system cpu information
-int fill_system_cpu_info(struct system_info_t *sys_info)
+static int fill_system_cpu_info(struct system_info_t *sys_info)
 {
        float sys_usage = 0.0f;
        int i = 0;
index 5ff2843bbef3ec6669463e1ab7aa9e5a95363e48..23bb195325998be046b65078f336a08659a88282 100644 (file)
@@ -227,8 +227,7 @@ int makeRecvThread(int index)
        return 0;
 }
 
-//static
-void* samplingThread(void* data)
+static void *samplingThread(void *data)
 {
        int err, signo;
        sigset_t waitsigmask;
index 62bd716a87124b48f95b91cbef0fbc6497294834..525ffac119f0df14bf13159315121a0310f225eb 100644 (file)
@@ -369,7 +369,7 @@ pid_t find_pid_from_path(const char* path)
        return status;
 }
 
-pid_t get_pid_by_path(const char *binary_path)
+static pid_t get_pid_by_path(const char *binary_path)
 {
        pid_t pkg_pid;
        int len;