forked from enlightenment/enlightenment
fix warnings in build so new ones turn up and get fixed.
This commit is contained in:
parent
02a71ca145
commit
3dc555a7cf
|
@ -9708,8 +9708,10 @@ _e_fm2_new_thread_helper(Ecore_Thread *eth, Eina_Bool dir)
|
|||
texts = ecore_thread_global_data_wait("efm_text_uri_list", 0.01);
|
||||
EINA_LIST_FOREACH(texts, l, path)
|
||||
{
|
||||
write(fd, path, strlen(path));
|
||||
write(fd, "\n", 1);
|
||||
if (write(fd, path, strlen(path)) < 0)
|
||||
perror("write");
|
||||
if (write(fd, "\n", 1) < 0)
|
||||
perror("write");
|
||||
}
|
||||
close(fd);
|
||||
ecore_thread_feedback(eth, strdup(buf));
|
||||
|
@ -9742,8 +9744,10 @@ _e_fm2_new_thread_helper(Ecore_Thread *eth, Eina_Bool dir)
|
|||
texts = ecore_thread_global_data_wait("efm_text_uri_list", 0.01);
|
||||
EINA_LIST_FOREACH(texts, l, path)
|
||||
{
|
||||
write(fd, path, strlen(path));
|
||||
write(fd, "\n", 1);
|
||||
if (write(fd, path, strlen(path)) < 0)
|
||||
perror("write");
|
||||
if (write(fd, "\n", 1) < 0)
|
||||
perror("write");
|
||||
}
|
||||
close(fd);
|
||||
ecore_thread_feedback(eth, strdup(buf));
|
||||
|
|
|
@ -659,7 +659,7 @@ _e_fm_main_udisks_format_error_msg(char **buf,
|
|||
const char *name,
|
||||
const char *message)
|
||||
{
|
||||
int size, vu, vm, en;
|
||||
int size, vu, vm = 1, en;
|
||||
char *tmp;
|
||||
|
||||
vu = strlen(v->udi) + 1;
|
||||
|
@ -675,6 +675,11 @@ _e_fm_main_udisks_format_error_msg(char **buf,
|
|||
strcpy(tmp, v->mount_point);
|
||||
tmp += vm;
|
||||
}
|
||||
else
|
||||
{
|
||||
*tmp = 0;
|
||||
tmp += vm;
|
||||
}
|
||||
strcpy(tmp, name);
|
||||
tmp += en;
|
||||
strcpy(tmp, message);
|
||||
|
|
|
@ -738,7 +738,7 @@ _e_fm_main_udisks2_format_error_msg(char **buf,
|
|||
const char *name,
|
||||
const char *message)
|
||||
{
|
||||
int size, vu, vm, en;
|
||||
int size, vu, vm = 1, en;
|
||||
char *tmp;
|
||||
|
||||
vu = strlen(v->udi) + 1;
|
||||
|
@ -754,6 +754,11 @@ _e_fm_main_udisks2_format_error_msg(char **buf,
|
|||
strcpy(tmp, v->mount_point);
|
||||
tmp += vm;
|
||||
}
|
||||
else
|
||||
{
|
||||
*tmp = 0;
|
||||
tmp += vm;
|
||||
}
|
||||
strcpy(tmp, name);
|
||||
tmp += en;
|
||||
strcpy(tmp, message);
|
||||
|
|
|
@ -957,7 +957,8 @@ _e_fm_op_send_error(E_Fm_Op_Task *task, E_Fm_Op_Type type, const char *fmt, ...)
|
|||
*((int *)(buf + sizeof(int))) = type;
|
||||
*((int *)(buf + (2 * sizeof(int)))) = len + 1;
|
||||
|
||||
write(STDOUT_FILENO, buf, (3 * sizeof(int)) + len + 1);
|
||||
if (write(STDOUT_FILENO, buf, (3 * sizeof(int)) + len + 1) < 0)
|
||||
perror("write");
|
||||
|
||||
E_FM_OP_DEBUG("%s", str);
|
||||
E_FM_OP_DEBUG(" Error sent.\n");
|
||||
|
@ -1036,7 +1037,8 @@ _e_fm_op_update_progress_report(int percent, int eta, double elapsed, off_t done
|
|||
P(dst);
|
||||
#undef P
|
||||
|
||||
write(STDOUT_FILENO, data, (3 * sizeof(int)) + size);
|
||||
if (write(STDOUT_FILENO, data, (3 * sizeof(int)) + size) < 0)
|
||||
perror("write");
|
||||
|
||||
E_FM_OP_DEBUG("Time left: %d at %e\n", eta, elapsed);
|
||||
E_FM_OP_DEBUG("Progress %d. \n", percent);
|
||||
|
@ -1122,8 +1124,10 @@ _e_fm_op_copy_stat_info(E_Fm_Op_Task *task)
|
|||
|
||||
if (!task->dst.name) return;
|
||||
|
||||
chmod(task->dst.name, task->src.st.st_mode);
|
||||
chown(task->dst.name, task->src.st.st_uid, task->src.st.st_gid);
|
||||
if (chmod(task->dst.name, task->src.st.st_mode) < 0)
|
||||
perror("chmod");
|
||||
if (chown(task->dst.name, task->src.st.st_uid, task->src.st.st_gid) < 0)
|
||||
perror("chown");
|
||||
ut.actime = task->src.st.st_atime;
|
||||
ut.modtime = task->src.st.st_mtime;
|
||||
utime(task->dst.name, &ut);
|
||||
|
|
|
@ -191,7 +191,7 @@ _e_static_grab_cpu(E_Static_Grab *grab)
|
|||
char *end;
|
||||
size_t length = 0;
|
||||
|
||||
fgets(buf, sizeof (buf), f);
|
||||
if (!fgets(buf, sizeof (buf), f)) break;
|
||||
length = strlen(buf);
|
||||
end = buf + length;
|
||||
|
||||
|
|
|
@ -88,7 +88,9 @@ main(int argc,
|
|||
|
||||
val = argv[i] + 7;
|
||||
if (*val)
|
||||
nice(atoi(val));
|
||||
{
|
||||
if (nice(atoi(val)) < 0) perror("nice");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -830,7 +830,12 @@ _clock_fd_update(void *d __UNUSED__, Ecore_Fd_Handler *fdh)
|
|||
{
|
||||
char buf[64];
|
||||
|
||||
read(ecore_main_fd_handler_fd_get(fdh), buf, sizeof(buf));
|
||||
if (read(ecore_main_fd_handler_fd_get(fdh), buf, sizeof(buf)) < 0)
|
||||
{
|
||||
close(ecore_main_fd_handler_fd_get(fdh));
|
||||
timerfd_handler = ecore_main_fd_handler_del(timerfd_handler);
|
||||
return EINA_FALSE;
|
||||
}
|
||||
e_int_clock_instances_redo(EINA_TRUE);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
|
|
@ -1271,7 +1271,7 @@ _e_fwin_desktop_run(Efreet_Desktop *desktop,
|
|||
if (!selected) return;
|
||||
|
||||
if (!getcwd(pcwd, sizeof(pcwd))) return;
|
||||
if (0 > chdir(e_fm2_real_path_get(page->fm_obj))) return;
|
||||
if (chdir(e_fm2_real_path_get(page->fm_obj)) < 0) return;
|
||||
|
||||
EINA_LIST_FOREACH(selected, l, ici)
|
||||
{
|
||||
|
@ -1311,7 +1311,7 @@ _e_fwin_desktop_run(Efreet_Desktop *desktop,
|
|||
|
||||
EINA_LIST_FREE(files, file) free(file);
|
||||
|
||||
chdir(pcwd);
|
||||
if (chdir(pcwd) < 0) perror("chdir");
|
||||
}
|
||||
|
||||
static E_Fwin_Exec_Type
|
||||
|
@ -1989,9 +1989,9 @@ _e_fwin_cb_dir_handler(void *data __UNUSED__, Evas_Object *obj __UNUSED__, const
|
|||
|
||||
if (!getcwd(buf, sizeof(buf))) return;
|
||||
|
||||
chdir(path);
|
||||
if (chdir(path) < 0) perror("chdir");
|
||||
e_exec(e_util_zone_current_get(e_manager_current_get()), tdesktop, NULL, NULL, "fileman");
|
||||
chdir(buf);
|
||||
if (chdir(buf) < 0) perror("chdir");
|
||||
/* FIXME: if info != null then check mime type and offer options based
|
||||
* on that
|
||||
*/
|
||||
|
@ -2461,8 +2461,8 @@ _e_fwin_file_open_dialog(E_Fwin_Page *page,
|
|||
if ((has_default) && (apps)) desk = apps->data;
|
||||
else if (mlist) desk = e_exehist_mime_desktop_get(mlist->data);
|
||||
//fprintf(stderr, "mlist = %p\n", mlist);
|
||||
getcwd(pcwd, sizeof(pcwd));
|
||||
chdir(e_fm2_real_path_get(page->fm_obj));
|
||||
if (!getcwd(pcwd, sizeof(pcwd))) perror("getcwd");
|
||||
if (chdir(e_fm2_real_path_get(page->fm_obj)) < 0) perror("chdir");
|
||||
|
||||
files_list = NULL;
|
||||
EINA_LIST_FOREACH(files, l, ici)
|
||||
|
@ -2500,7 +2500,7 @@ _e_fwin_file_open_dialog(E_Fwin_Page *page,
|
|||
EINA_LIST_FREE(files_list, file)
|
||||
free(file);
|
||||
|
||||
chdir(pcwd);
|
||||
if (chdir(pcwd) < 0) perror("chdir");
|
||||
if (!need_dia)
|
||||
{
|
||||
EINA_LIST_FREE(apps, desk) efreet_desktop_free(desk);
|
||||
|
|
Loading…
Reference in New Issue