summaryrefslogtreecommitdiff
path: root/ism
diff options
context:
space:
mode:
authorJi-hoon Lee <dalton.lee@samsung.com>2018-05-02 10:59:18 +0900
committerJi-hoon Lee <dalton.lee@samsung.com>2018-05-02 10:59:23 +0900
commita13eaac8c326c938ec5a3ad9236aebb83e1d1dc4 (patch)
treeeb6383e0a8dfa6fcfb48707a12fdb41afae504bd /ism
parentf8ce513d8b8d7c883a8b94dbc66bddbf8d07b98e (diff)
downloadisf-a13eaac8c326c938ec5a3ad9236aebb83e1d1dc4.tar.gz
isf-a13eaac8c326c938ec5a3ad9236aebb83e1d1dc4.tar.bz2
isf-a13eaac8c326c938ec5a3ad9236aebb83e1d1dc4.zip
Fix defects detected by static analysis tool
Some of the local variables' names are identical to function parameters, unintentionally hides parameters. Change-Id: Id0c023e315a0a9818b86550e8e8fcca7963962b3
Diffstat (limited to 'ism')
-rw-r--r--ism/extras/wayland_immodule/wayland_imcontext.c8
-rw-r--r--ism/modules/panelagent/ecoresocket/ecore_socket_panel_agent_module.cpp16
-rw-r--r--ism/src/isf_info_manager.cpp8
3 files changed, 16 insertions, 16 deletions
diff --git a/ism/extras/wayland_immodule/wayland_imcontext.c b/ism/extras/wayland_immodule/wayland_imcontext.c
index 05459187..6aabfc71 100644
--- a/ism/extras/wayland_immodule/wayland_imcontext.c
+++ b/ism/extras/wayland_immodule/wayland_imcontext.c
@@ -885,14 +885,14 @@ rotary_event_cb(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
ecore_imf_context_reset(active_ctx);
WaylandIMContext *imcontext = (WaylandIMContext *)ecore_imf_context_data_get(active_ctx);
if (imcontext && imcontext->input && imcontext->text_input) {
- isf_device_type_e type = find_device_type_from_ecore_event(ECORE_EVENT_DETENT_ROTATE);
+ isf_device_type_e device_type = find_device_type_from_ecore_event(ECORE_EVENT_DETENT_ROTATE);
char *buffer = NULL;
size_t buflen = 0;
if (device_buffer_encode((const char*)(event), sizeof(Ecore_Event_Detent_Rotate), &buffer, &buflen) &&
buffer && buflen > 0) {
wl_text_input_process_input_device_event(imcontext->text_input,
- (unsigned int)type, buffer, buflen);
+ (unsigned int)device_type, buffer, buflen);
}
if (buffer) free(buffer);
}
@@ -3387,10 +3387,10 @@ wayland_im_context_filter_event(Ecore_IMF_Context *ctx,
if (eina_list_count (imcontext->keysym_list)) {
Eina_List *n = eina_list_last(imcontext->keysym_list);
ev = (Ecore_Event_Key *)eina_list_data_get(n);
- int type = (unsigned long int)ev->data;
+ int event_type = (unsigned long int)ev->data;
ev->data = NULL;
- ecore_event_add(type, ev, _ecore_keyevent_free, NULL);
+ ecore_event_add(event_type, ev, _ecore_keyevent_free, NULL);
imcontext->keysym_list = eina_list_remove_list(imcontext->keysym_list, n);
}
}
diff --git a/ism/modules/panelagent/ecoresocket/ecore_socket_panel_agent_module.cpp b/ism/modules/panelagent/ecoresocket/ecore_socket_panel_agent_module.cpp
index 38c4d29a..e266c937 100644
--- a/ism/modules/panelagent/ecoresocket/ecore_socket_panel_agent_module.cpp
+++ b/ism/modules/panelagent/ecoresocket/ecore_socket_panel_agent_module.cpp
@@ -1915,13 +1915,13 @@ private:
m_info_manager->hide_isf_panel(client_id);
continue;
} else if (cmd == ISM_TRANS_CMD_SHOW_ISE_PANEL) {
- uint32 client;
- uint32 context;
+ uint32 target_client;
+ uint32 target_context;
char* data = NULL;
size_t len;
bool ret = false;
- if (m_recv_trans.get_data(client) && m_recv_trans.get_data(context) && m_recv_trans.get_data(&data, len)) {
+ if (m_recv_trans.get_data(target_client) && m_recv_trans.get_data(target_context) && m_recv_trans.get_data(&data, len)) {
ret = true;
} else {
LOGW ("wrong format of transaction");
@@ -1937,18 +1937,18 @@ private:
trans.write_to_socket(client_socket);
if (ret)
- m_info_manager->show_ise_panel(client_id, client, context, data, len);
+ m_info_manager->show_ise_panel(client_id, target_client, target_context, data, len);
if (data != NULL)
delete[] data;
continue;
} else if (cmd == ISM_TRANS_CMD_HIDE_ISE_PANEL) {
- uint32 client;
- uint32 context;
+ uint32 target_client;
+ uint32 target_context;
- if (m_recv_trans.get_data(client) && m_recv_trans.get_data(context)) {
- m_info_manager->hide_ise_panel(client_id, client, context);
+ if (m_recv_trans.get_data(target_client) && m_recv_trans.get_data(target_context)) {
+ m_info_manager->hide_ise_panel(client_id, target_client, target_context);
} else {
LOGW ("wrong format of transaction");
}
diff --git a/ism/src/isf_info_manager.cpp b/ism/src/isf_info_manager.cpp
index 3006799d..25fa2417 100644
--- a/ism/src/isf_info_manager.cpp
+++ b/ism/src/isf_info_manager.cpp
@@ -4224,11 +4224,11 @@ client context helpers: %d, helpers uuid count: %d",
HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
if (it != m_helper_client_index.end ()) {
- int client;
- uint32 context;
+ int focused_client;
+ uint32 focused_context;
uint32 ctx;
- get_focused_context (client, context);
- ctx = get_helper_ic (client, context);
+ get_focused_context (focused_client, focused_context);
+ ctx = get_helper_ic (focused_client, focused_context);
m_panel_agent_manager.set_prediction_allow (it->second.id, ctx, m_current_helper_uuid, mode);
return true;
}