From adb0a29c3782ac1c8eb907ba406f90ab7c866b6d Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Tue, 20 Feb 2018 11:25:17 +0900 Subject: [PATCH] Fix issue detected by static analysis tool Branch past initialization : If the variable is used after the target, it will be uninitialized. Change-Id: I6d6d32650616b9803829c8954caa5ee5b31ae3cc Signed-off-by: Jihoon Kim --- src/e_mod_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/e_mod_main.c b/src/e_mod_main.c index 7a4a3ab..1e73523 100644 --- a/src/e_mod_main.c +++ b/src/e_mod_main.c @@ -1229,6 +1229,7 @@ _e_text_input_cb_activate(struct wl_client *client, struct wl_resource *resource E_Input_Method *input_method = NULL; E_Text_Input *old = NULL; E_Input_Method_Context *context = NULL; + E_Client *ec = NULL; EINA_SAFETY_ON_NULL_GOTO(resource, err); EINA_SAFETY_ON_NULL_GOTO(seat, err); @@ -1236,7 +1237,7 @@ _e_text_input_cb_activate(struct wl_client *client, struct wl_resource *resource EINA_SAFETY_ON_NULL_GOTO(g_input_method->resource, err); /* Store application window's E_Client* value for setting transient_for information later */ - E_Client *ec = wl_resource_get_user_data(surface); + ec = wl_resource_get_user_data(surface); EINA_SAFETY_ON_NULL_GOTO(ec, err); EINA_SAFETY_ON_TRUE_GOTO(e_object_is_del(E_OBJECT(ec)), err); client_surface_ec = ec; -- 2.7.4