From 973a8f4e3613f5d76508140842015fd2ae907723 Mon Sep 17 00:00:00 2001 From: Sung-jae Park Date: Tue, 22 Oct 2013 13:41:25 +0900 Subject: [PATCH] Shut gcc compile warning. This is so stupid compiler. Even though I used them for out-value. but it complains uninitialized variable. What... Change-Id: I1818b60a1a8deb849f0a578d9325b823e97cfacd --- src/server.c | 232 +++++++++++++++++++++++++++++------------------------------ 1 file changed, 116 insertions(+), 116 deletions(-) diff --git a/src/server.c b/src/server.c index d474df9..bbe22bb 100644 --- a/src/server.c +++ b/src/server.c @@ -532,7 +532,7 @@ out: return result; } -static inline int validate_request(const char *pkgname, const char *id, struct inst_info **out_inst, const struct pkg_info **out_pkg) +static int validate_request(const char *pkgname, const char *id, struct inst_info **out_inst, const struct pkg_info **out_pkg) { struct inst_info *inst; const struct pkg_info *pkg; @@ -576,7 +576,7 @@ static struct packet *client_clicked(pid_t pid, int handle, const struct packet double x; double y; int ret; - struct inst_info *inst; + struct inst_info *inst = NULL; client = client_find_by_rpc_handle(handle); if (!client) { @@ -613,7 +613,7 @@ static struct packet *client_update_mode(pid_t pid, int handle, const struct pac const char *pkgname; const char *id; int ret; - struct inst_info *inst; + struct inst_info *inst = NULL; client = client_find_by_rpc_handle(handle); if (!client) { @@ -660,7 +660,7 @@ static struct packet *client_text_signal(pid_t pid, int handle, const struct pac double sy; double ex; double ey; - struct inst_info *inst; + struct inst_info *inst = NULL; int ret; client = client_find_by_rpc_handle(handle); @@ -721,7 +721,7 @@ static struct packet *client_delete(pid_t pid, int handle, const struct packet * struct packet *result; const char *pkgname; const char *id; - struct inst_info *inst; + struct inst_info *inst = NULL; int ret; client = client_find_by_rpc_handle(handle); @@ -804,7 +804,7 @@ static struct packet *client_resize(pid_t pid, int handle, const struct packet * const char *id; int w; int h; - struct inst_info *inst; + struct inst_info *inst = NULL; int ret; client = client_find_by_rpc_handle(handle); @@ -953,7 +953,7 @@ static struct packet *client_change_visibility(pid_t pid, int handle, const stru const char *id; enum livebox_visible_state state; int ret; - struct inst_info *inst; + struct inst_info *inst = NULL; client = client_find_by_rpc_handle(handle); if (!client) { @@ -998,7 +998,7 @@ static struct packet *client_set_period(pid_t pid, int handle, const struct pack const char *id; double period; int ret; - struct inst_info *inst; + struct inst_info *inst = NULL; client = client_find_by_rpc_handle(handle); if (!client) { @@ -1049,7 +1049,7 @@ static struct packet *client_change_group(pid_t pid, int handle, const struct pa const char *id; const char *cluster; const char *category; - struct inst_info *inst; + struct inst_info *inst = NULL; int ret; client = client_find_by_rpc_handle(handle); @@ -1102,8 +1102,8 @@ static struct packet *client_pd_mouse_enter(pid_t pid, int handle, const struct double timestamp; int x; int y; - struct inst_info *inst; - const struct pkg_info *pkg; + struct inst_info *inst = NULL; + const struct pkg_info *pkg = NULL; client = client_find_by_rpc_handle(handle); if (!client) { @@ -1164,8 +1164,8 @@ static struct packet *client_pd_mouse_leave(pid_t pid, int handle, const struct double timestamp; int x; int y; - struct inst_info *inst; - const struct pkg_info *pkg; + struct inst_info *inst = NULL; + const struct pkg_info *pkg = NULL; client = client_find_by_rpc_handle(handle); if (!client) { @@ -1226,8 +1226,8 @@ static struct packet *client_pd_mouse_down(pid_t pid, int handle, const struct p double timestamp; int x; int y; - struct inst_info *inst; - const struct pkg_info *pkg; + struct inst_info *inst = NULL; + const struct pkg_info *pkg = NULL; client = client_find_by_rpc_handle(handle); if (!client) { @@ -1288,8 +1288,8 @@ static struct packet *client_pd_mouse_up(pid_t pid, int handle, const struct pac double timestamp; int x; int y; - struct inst_info *inst; - const struct pkg_info *pkg; + struct inst_info *inst = NULL; + const struct pkg_info *pkg = NULL; client = client_find_by_rpc_handle(handle); if (!client) { @@ -1350,8 +1350,8 @@ static struct packet *client_pd_mouse_move(pid_t pid, int handle, const struct p double timestamp; int x; int y; - struct inst_info *inst; - const struct pkg_info *pkg; + struct inst_info *inst = NULL; + const struct pkg_info *pkg = NULL; client = client_find_by_rpc_handle(handle); if (!client) { @@ -1412,8 +1412,8 @@ static struct packet *client_lb_mouse_move(pid_t pid, int handle, const struct p double timestamp; int x; int y; - struct inst_info *inst; - const struct pkg_info *pkg; + struct inst_info *inst = NULL; + const struct pkg_info *pkg = NULL; client = client_find_by_rpc_handle(handle); if (!client) { @@ -1480,8 +1480,8 @@ static struct packet *client_lb_mouse_set(pid_t pid, int handle, const struct pa double timestamp; int x; int y; - struct inst_info *inst; - const struct pkg_info *pkg; + struct inst_info *inst = NULL; + const struct pkg_info *pkg = NULL; client = client_find_by_rpc_handle(handle); if (!client) { @@ -1529,8 +1529,8 @@ static struct packet *client_lb_mouse_unset(pid_t pid, int handle, const struct double timestamp; int x; int y; - struct inst_info *inst; - const struct pkg_info *pkg; + struct inst_info *inst = NULL; + const struct pkg_info *pkg = NULL; client = client_find_by_rpc_handle(handle); if (!client) { @@ -1578,8 +1578,8 @@ static struct packet *client_pd_mouse_set(pid_t pid, int handle, const struct pa double timestamp; int x; int y; - struct inst_info *inst; - const struct pkg_info *pkg; + struct inst_info *inst = NULL; + const struct pkg_info *pkg = NULL; client = client_find_by_rpc_handle(handle); if (!client) { @@ -1628,8 +1628,8 @@ static struct packet *client_pd_mouse_unset(pid_t pid, int handle, const struct double timestamp; int x; int y; - struct inst_info *inst; - const struct pkg_info *pkg; + struct inst_info *inst = NULL; + const struct pkg_info *pkg = NULL; client = client_find_by_rpc_handle(handle); if (!client) { @@ -1677,8 +1677,8 @@ static struct packet *client_lb_mouse_enter(pid_t pid, int handle, const struct double timestamp; int x; int y; - struct inst_info *inst; - const struct pkg_info *pkg; + struct inst_info *inst = NULL; + const struct pkg_info *pkg = NULL; client = client_find_by_rpc_handle(handle); if (!client) { @@ -1739,8 +1739,8 @@ static struct packet *client_lb_mouse_leave(pid_t pid, int handle, const struct double timestamp; int x; int y; - struct inst_info *inst; - const struct pkg_info *pkg; + struct inst_info *inst = NULL; + const struct pkg_info *pkg = NULL; client = client_find_by_rpc_handle(handle); if (!client) { @@ -1801,8 +1801,8 @@ static struct packet *client_lb_mouse_down(pid_t pid, int handle, const struct p double timestamp; int x; int y; - struct inst_info *inst; - const struct pkg_info *pkg; + struct inst_info *inst = NULL; + const struct pkg_info *pkg = NULL; client = client_find_by_rpc_handle(handle); if (!client) { @@ -1863,8 +1863,8 @@ static struct packet *client_lb_mouse_up(pid_t pid, int handle, const struct pac double timestamp; int x; int y; - struct inst_info *inst; - const struct pkg_info *pkg; + struct inst_info *inst = NULL; + const struct pkg_info *pkg = NULL; client = client_find_by_rpc_handle(handle); if (!client) { @@ -1926,8 +1926,8 @@ static struct packet *client_pd_access_action_up(pid_t pid, int handle, const st double timestamp; int x; int y; - struct inst_info *inst; - const struct pkg_info *pkg; + struct inst_info *inst = NULL; + const struct pkg_info *pkg = NULL; client = client_find_by_rpc_handle(handle); if (!client) { @@ -2011,8 +2011,8 @@ static struct packet *client_pd_access_action_down(pid_t pid, int handle, const double timestamp; int x; int y; - struct inst_info *inst; - const struct pkg_info *pkg; + struct inst_info *inst = NULL; + const struct pkg_info *pkg = NULL; client = client_find_by_rpc_handle(handle); if (!client) { @@ -2096,8 +2096,8 @@ static struct packet *client_pd_access_scroll_down(pid_t pid, int handle, const double timestamp; int x; int y; - struct inst_info *inst; - const struct pkg_info *pkg; + struct inst_info *inst = NULL; + const struct pkg_info *pkg = NULL; client = client_find_by_rpc_handle(handle); if (!client) { @@ -2181,8 +2181,8 @@ static struct packet *client_pd_access_scroll_move(pid_t pid, int handle, const double timestamp; int x; int y; - struct inst_info *inst; - const struct pkg_info *pkg; + struct inst_info *inst = NULL; + const struct pkg_info *pkg = NULL; client = client_find_by_rpc_handle(handle); if (!client) { @@ -2266,8 +2266,8 @@ static struct packet *client_pd_access_scroll_up(pid_t pid, int handle, const st double timestamp; int x; int y; - struct inst_info *inst; - const struct pkg_info *pkg; + struct inst_info *inst = NULL; + const struct pkg_info *pkg = NULL; client = client_find_by_rpc_handle(handle); if (!client) { @@ -2349,8 +2349,8 @@ static struct packet *client_pd_access_unhighlight(pid_t pid, int handle, const const char *id; int x; int y; - struct inst_info *inst; - const struct pkg_info *pkg; + struct inst_info *inst = NULL; + const struct pkg_info *pkg = NULL; int ret; double timestamp; @@ -2435,8 +2435,8 @@ static struct packet *client_pd_access_hl(pid_t pid, int handle, const struct pa double timestamp; int x; int y; - struct inst_info *inst; - const struct pkg_info *pkg; + struct inst_info *inst = NULL; + const struct pkg_info *pkg = NULL; client = client_find_by_rpc_handle(handle); if (!client) { @@ -2520,8 +2520,8 @@ static struct packet *client_pd_access_hl_prev(pid_t pid, int handle, const stru double timestamp; int x; int y; - struct inst_info *inst; - const struct pkg_info *pkg; + struct inst_info *inst = NULL; + const struct pkg_info *pkg = NULL; client = client_find_by_rpc_handle(handle); if (!client) { @@ -2605,8 +2605,8 @@ static struct packet *client_pd_access_hl_next(pid_t pid, int handle, const stru double timestamp; int x; int y; - struct inst_info *inst; - const struct pkg_info *pkg; + struct inst_info *inst = NULL; + const struct pkg_info *pkg = NULL; client = client_find_by_rpc_handle(handle); if (!client) { @@ -2696,8 +2696,8 @@ static struct packet *client_pd_access_activate(pid_t pid, int handle, const str double timestamp; int x; int y; - struct inst_info *inst; - const struct pkg_info *pkg; + struct inst_info *inst = NULL; + const struct pkg_info *pkg = NULL; client = client_find_by_rpc_handle(handle); if (!client) { @@ -2780,8 +2780,8 @@ static struct packet *client_pd_key_down(pid_t pid, int handle, const struct pac double timestamp; int x; int y; - struct inst_info *inst; - const struct pkg_info *pkg; + struct inst_info *inst = NULL; + const struct pkg_info *pkg = NULL; client = client_find_by_rpc_handle(handle); if (!client) { @@ -2902,8 +2902,8 @@ static struct packet *client_pd_key_up(pid_t pid, int handle, const struct packe double timestamp; int x; int y; - struct inst_info *inst; - const struct pkg_info *pkg; + struct inst_info *inst = NULL; + const struct pkg_info *pkg = NULL; client = client_find_by_rpc_handle(handle); if (!client) { @@ -2967,8 +2967,8 @@ static struct packet *client_lb_access_hl(pid_t pid, int handle, const struct pa double timestamp; int x; int y; - struct inst_info *inst; - const struct pkg_info *pkg; + struct inst_info *inst = NULL; + const struct pkg_info *pkg = NULL; client = client_find_by_rpc_handle(handle); if (!client) { @@ -3052,8 +3052,8 @@ static struct packet *client_lb_access_hl_prev(pid_t pid, int handle, const stru double timestamp; int x; int y; - struct inst_info *inst; - const struct pkg_info *pkg; + struct inst_info *inst = NULL; + const struct pkg_info *pkg = NULL; client = client_find_by_rpc_handle(handle); if (!client) { @@ -3137,8 +3137,8 @@ static struct packet *client_lb_access_hl_next(pid_t pid, int handle, const stru double timestamp; int x; int y; - struct inst_info *inst; - const struct pkg_info *pkg; + struct inst_info *inst = NULL; + const struct pkg_info *pkg = NULL; client = client_find_by_rpc_handle(handle); if (!client) { @@ -3220,8 +3220,8 @@ static struct packet *client_lb_access_action_up(pid_t pid, int handle, const st const char *id; int ret; double timestamp; - struct inst_info *inst; - const struct pkg_info *pkg; + struct inst_info *inst = NULL; + const struct pkg_info *pkg = NULL; int x; int y; @@ -3312,8 +3312,8 @@ static struct packet *client_lb_access_action_down(pid_t pid, int handle, const const char *id; int ret; double timestamp; - struct inst_info *inst; - const struct pkg_info *pkg; + struct inst_info *inst = NULL; + const struct pkg_info *pkg = NULL; int x; int y; @@ -3406,8 +3406,8 @@ static struct packet *client_lb_access_unhighlight(pid_t pid, int handle, const double timestamp; int x; int y; - struct inst_info *inst; - const struct pkg_info *pkg; + struct inst_info *inst = NULL; + const struct pkg_info *pkg = NULL; client = client_find_by_rpc_handle(handle); if (!client) { @@ -3489,8 +3489,8 @@ static struct packet *client_lb_access_scroll_down(pid_t pid, int handle, const const char *id; int ret; double timestamp; - struct inst_info *inst; - const struct pkg_info *pkg; + struct inst_info *inst = NULL; + const struct pkg_info *pkg = NULL; int x; int y; @@ -3581,8 +3581,8 @@ static struct packet *client_lb_access_scroll_move(pid_t pid, int handle, const const char *id; int ret; double timestamp; - struct inst_info *inst; - const struct pkg_info *pkg; + struct inst_info *inst = NULL; + const struct pkg_info *pkg = NULL; int x; int y; @@ -3673,8 +3673,8 @@ static struct packet *client_lb_access_scroll_up(pid_t pid, int handle, const st const char *id; int ret; double timestamp; - struct inst_info *inst; - const struct pkg_info *pkg; + struct inst_info *inst = NULL; + const struct pkg_info *pkg = NULL; int x; int y; @@ -3767,8 +3767,8 @@ static struct packet *client_lb_access_activate(pid_t pid, int handle, const str double timestamp; int x; int y; - struct inst_info *inst; - const struct pkg_info *pkg; + struct inst_info *inst = NULL; + const struct pkg_info *pkg = NULL; client = client_find_by_rpc_handle(handle); if (!client) { @@ -3853,8 +3853,8 @@ static struct packet *client_lb_key_down(pid_t pid, int handle, const struct pac double timestamp; int x; int y; - struct inst_info *inst; - const struct pkg_info *pkg; + struct inst_info *inst = NULL; + const struct pkg_info *pkg = NULL; client = client_find_by_rpc_handle(handle); if (!client) { @@ -3918,8 +3918,8 @@ static struct packet *client_lb_key_up(pid_t pid, int handle, const struct packe double timestamp; int x; int y; - struct inst_info *inst; - const struct pkg_info *pkg; + struct inst_info *inst = NULL; + const struct pkg_info *pkg = NULL; client = client_find_by_rpc_handle(handle); if (!client) { @@ -3987,7 +3987,7 @@ static struct packet *client_lb_acquire_pixmap(pid_t pid, int handle, const stru const char *pkgname; const char *id; struct client_node *client; - struct inst_info *inst; + struct inst_info *inst = NULL; int ret; int pixmap = 0; void *buf_ptr; @@ -4069,7 +4069,7 @@ static struct packet *client_lb_release_pixmap(pid_t pid, int handle, const stru const char *pkgname; const char *id; struct client_node *client; - struct inst_info *inst; + struct inst_info *inst = NULL; int pixmap; void *buf_ptr; int ret; @@ -4112,7 +4112,7 @@ static struct packet *client_pd_acquire_pixmap(pid_t pid, int handle, const stru const char *pkgname; const char *id; struct client_node *client; - struct inst_info *inst; + struct inst_info *inst = NULL; int ret; int pixmap = 0; void *buf_ptr; @@ -4240,7 +4240,7 @@ static struct packet *client_pinup_changed(pid_t pid, int handle, const struct p const char *id; int pinup; int ret; - struct inst_info *inst; + struct inst_info *inst = NULL; client = client_find_by_rpc_handle(handle); if (!client) { @@ -4340,8 +4340,8 @@ static Eina_Bool lazy_pd_destroyed_cb(void *inst) static struct packet *client_pd_move(pid_t pid, int handle, const struct packet *packet) /* pkgname, id, x, y */ { struct client_node *client; - struct inst_info *inst; - const struct pkg_info *pkg; + struct inst_info *inst = NULL; + const struct pkg_info *pkg = NULL; const char *pkgname; const char *id; double x = 0.0f; @@ -4462,8 +4462,8 @@ static struct packet *client_create_pd(pid_t pid, int handle, const struct packe const char *pkgname; const char *id; int ret; - struct inst_info *inst; - const struct pkg_info *pkg; + struct inst_info *inst = NULL; + const struct pkg_info *pkg = NULL; Ecore_Timer *pd_monitor; double x; double y; @@ -4681,8 +4681,8 @@ static struct packet *client_destroy_pd(pid_t pid, int handle, const struct pack const char *pkgname; const char *id; int ret; - struct inst_info *inst; - const struct pkg_info *pkg; + struct inst_info *inst = NULL; + const struct pkg_info *pkg = NULL; Ecore_Timer *pd_monitor; struct slave_node *slave; @@ -5053,7 +5053,7 @@ static inline int update_pkg_cb(struct category *category, const char *pkgname) static struct packet *client_update(pid_t pid, int handle, const struct packet *packet) { - struct inst_info *inst; + struct inst_info *inst = NULL; struct client_node *client; const char *pkgname; const char *id; @@ -5377,8 +5377,8 @@ out: static struct packet *slave_lb_update_begin(pid_t pid, int handle, const struct packet *packet) { struct slave_node *slave; - struct inst_info *inst; - const struct pkg_info *pkg; + struct inst_info *inst = NULL; + const struct pkg_info *pkg = NULL; const char *pkgname; const char *id; double priority; @@ -5424,8 +5424,8 @@ out: static struct packet *slave_lb_update_end(pid_t pid, int handle, const struct packet *packet) { struct slave_node *slave; - struct inst_info *inst; - const struct pkg_info *pkg; + struct inst_info *inst = NULL; + const struct pkg_info *pkg = NULL; const char *pkgname; const char *id; int ret; @@ -5468,8 +5468,8 @@ out: static struct packet *slave_pd_update_begin(pid_t pid, int handle, const struct packet *packet) { struct slave_node *slave; - const struct pkg_info *pkg; - struct inst_info *inst; + const struct pkg_info *pkg = NULL; + struct inst_info *inst = NULL; const char *pkgname; const char *id; int ret; @@ -5509,7 +5509,7 @@ out: static struct packet *slave_access_status(pid_t pid, int handle, const struct packet *packet) { struct slave_node *slave; - struct inst_info *inst; + struct inst_info *inst = NULL; const char *pkgname; const char *id; int status; @@ -5543,8 +5543,8 @@ out: static struct packet *slave_pd_update_end(pid_t pid, int handle, const struct packet *packet) { struct slave_node *slave; - const struct pkg_info *pkg; - struct inst_info *inst; + const struct pkg_info *pkg = NULL; + struct inst_info *inst = NULL; const char *pkgname; const char *id; int ret; @@ -5647,7 +5647,7 @@ static struct packet *slave_updated(pid_t pid, int handle, const struct packet * int h; double priority; int ret; - struct inst_info *inst; + struct inst_info *inst = NULL; slave = slave_find_by_pid(pid); if (!slave) { @@ -5708,7 +5708,7 @@ out: static struct packet *slave_hold_scroll(pid_t pid, int handle, const struct packet *packet) { struct slave_node *slave; - struct inst_info *inst; + struct inst_info *inst = NULL; const char *pkgname; const char *id; int seize; @@ -5746,7 +5746,7 @@ static struct packet *slave_desc_updated(pid_t pid, int handle, const struct pac const char *id; const char *descfile; int ret; - struct inst_info *inst; + struct inst_info *inst = NULL; slave = slave_find_by_pid(pid); if (!slave) { @@ -5796,7 +5796,7 @@ static struct packet *slave_deleted(pid_t pid, int handle, const struct packet * const char *pkgname; const char *id; int ret; - struct inst_info *inst; + struct inst_info *inst = NULL; slave = slave_find_by_pid(pid); if (!slave) { @@ -5832,8 +5832,8 @@ static struct packet *slave_acquire_buffer(pid_t pid, int handle, const struct p int pixel_size; struct packet *result; struct slave_node *slave; - struct inst_info *inst; - const struct pkg_info *pkg; + struct inst_info *inst = NULL; + const struct pkg_info *pkg = NULL; int ret; slave = slave_find_by_pid(pid); @@ -5981,8 +5981,8 @@ static struct packet *slave_resize_buffer(pid_t pid, int handle, const struct pa const char *id; int w; int h; - struct inst_info *inst; - const struct pkg_info *pkg; + struct inst_info *inst = NULL; + const struct pkg_info *pkg = NULL; int ret; slave = slave_find_by_pid(pid); @@ -6071,8 +6071,8 @@ static struct packet *slave_release_buffer(pid_t pid, int handle, const struct p const char *id; struct packet *result; struct slave_node *slave; - struct inst_info *inst; - const struct pkg_info *pkg; + struct inst_info *inst = NULL; + const struct pkg_info *pkg = NULL; int ret; slave = slave_find_by_pid(pid); @@ -6182,7 +6182,7 @@ out: static struct packet *service_change_period(pid_t pid, int handle, const struct packet *packet) { - struct inst_info *inst; + struct inst_info *inst = NULL; struct packet *result; const char *pkgname; const char *id; -- 2.7.4