if (ret == PMINFO_R_OK) {
ret = pkgmgrinfo_appinfo_filter_add_string (handle, PMINFO_APPINFO_PROP_APP_CATEGORY, "http://tizen.org/category/ime-list");
if (ret == PMINFO_R_OK) {
- ret = pkgmgrinfo_appinfo_filter_foreach_appinfo (handle, _find_appid_from_category, &app_id);
+ pkgmgrinfo_appinfo_filter_foreach_appinfo (handle, _find_appid_from_category, &app_id);
}
pkgmgrinfo_appinfo_filter_destroy (handle);
if (ret == PMINFO_R_OK) {
ret = pkgmgrinfo_appinfo_filter_add_string(handle, PMINFO_APPINFO_PROP_APP_CATEGORY, "http://tizen.org/category/ime-selector");
if (ret == PMINFO_R_OK) {
- ret = pkgmgrinfo_appinfo_filter_foreach_appinfo(handle, _find_appid_from_category, &app_id);
+ pkgmgrinfo_appinfo_filter_foreach_appinfo(handle, _find_appid_from_category, &app_id);
}
pkgmgrinfo_appinfo_filter_destroy(handle);
if (ret == PMINFO_R_OK) {
ret = pkgmgrinfo_appinfo_filter_add_string (handle, PMINFO_APPINFO_PROP_APP_CATEGORY, "http://tizen.org/category/ime-selector");
if (ret == PMINFO_R_OK) {
- ret = pkgmgrinfo_appinfo_filter_foreach_appinfo (handle, _find_appid_from_category, &app_id);
+ pkgmgrinfo_appinfo_filter_foreach_appinfo (handle, _find_appid_from_category, &app_id);
}
pkgmgrinfo_appinfo_filter_destroy (handle);
update_ise_locale ();
} catch (scim::Exception & e) {
std::cerr << e.what () << "\n";
+ } catch (std::logic_error & e) {
+ std::cerr << e.what () << "\n";
}
#ifdef HAVE_ECOREX
xclient_message_handler = ecore_event_handler_add (ECORE_X_EVENT_CLIENT_MESSAGE, x_event_client_message_cb, NULL);
maxlen_before = cursor_pos - maxlen_before;
if (maxlen_after > wlen - cursor_pos)
- maxlen_after = wlen;
+ maxlen_after = (uint32_t)wlen;
else
maxlen_after = cursor_pos + maxlen_after;
if (trans.get_command (cmd) && cmd == SCIM_TRANS_CMD_REPLY &&
trans.get_data (str) &&
trans.get_command (cmd) && cmd == SCIM_TRANS_CMD_OK) {
- sscanf (str.c_str (), "%lE", val);
+ *val = strtod (str.c_str (), NULL);
return true;
}
LOGW ("wrong format of transaction\n");
if (m_receive_trans.get_data (key) &&
m_receive_trans.get_data (str)) {
double value;
- sscanf (str.c_str (), "%lE", &value);
+ value = strtod (str.c_str (), NULL);
SCIM_DEBUG_FRONTEND (3) << " Key (" << key << ").\n";
SCIM_DEBUG_FRONTEND (3) << " Value (" << value << ").\n";
EcoreSocketPanelAgent* _agent = (EcoreSocketPanelAgent*)data;
int fd = ecore_main_fd_handler_fd_get(fd_handler);
+ if (fd < 0)
+ return ECORE_CALLBACK_RENEW;
for (unsigned int i = 0; i < _agent->_read_handler_list.size(); i++) {
if (fd_handler == _agent->_read_handler_list [i]) {
struct timeval tv;
struct timezone tz; /* is not used since ages */
gettimeofday (&tv, &tz);
- tint = tv.tv_sec * 1000;
+ tint = (unsigned int)(tv.tv_sec * 1000);
tint = tint / 1000 * 1000;
- tint = tint + tv.tv_usec / 1000;
+ tint = (unsigned int)(tint + tv.tv_usec / 1000);
return tint;
}
WSCContextISF* wsc_ctx = (WSCContextISF*)data;
int fd = ecore_main_fd_handler_fd_get (fd_handler);
+ if (fd < 0)
+ return ECORE_CALLBACK_RENEW;
+
char buff[512];
int len = read (fd, buff, sizeof (buff) - 1);
if (len == 0) {
WSCContextISF* wsc_ctx = (WSCContextISF*)data;
LOGD("");
int fd = ecore_main_fd_handler_fd_get (fd_handler);
+ if (fd < 0)
+ return ECORE_CALLBACK_RENEW;
+
char buff[512];
int len = read (fd, buff, sizeof (buff) - 1);
if (len == 0) {
if (ic->selection_text_fd_read_handler) {
int fd = ecore_main_fd_handler_fd_get (ic->selection_text_fd_read_handler);
- close (fd);
+ if (fd >= 0)
+ close (fd);
+
ecore_main_fd_handler_del (ic->selection_text_fd_read_handler);
ic->selection_text_fd_read_handler = NULL;
}
mod_list.push_back(mname[i]);
struct stat sb;
- stat("/usr/lib/scim-1.0/1.4.0/IMEngine/socket.so", &sb);
- if (S_ISREG(sb.st_mode))
- mod_list.push_back("socket");
+ if (stat ("/usr/lib/scim-1.0/1.4.0/IMEngine/socket.so", &sb) == 0) {
+ if (S_ISREG(sb.st_mode))
+ mod_list.push_back("socket");
+ }
}
else {
_scim_get_module_paths (paths, type);
// Set correct permission for the socket file
#ifdef DISABLE_MULTIPLE_SOCKETS
if (m_family == SCIM_SOCKET_LOCAL) {
- ::chmod (data_un->sun_path, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
+ if (::chmod (data_un->sun_path, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH) == -1)
+ return false;
}
#else
if (m_family == SCIM_SOCKET_LOCAL) {
- ::chmod (data_un->sun_path, S_IRUSR | S_IWUSR);
+ if (::chmod (data_un->sun_path, S_IRUSR | S_IWUSR) == -1)
+ return false;
}
#endif
return 0;
}
+ if (feof (fp) != 0) {
+ fclose (fp);
+ return 0;
+ }
+
+ if (ferror (fp)) {
+ fclose (fp);
+ return 0;
+ }
+
try {
*bufptr = new char [statbuf.st_size];
} catch (...) {