Fix some errors thanks to llvm clang static analyzer, also begin config inwin.
This commit is contained in:
@@ -263,40 +263,40 @@ ecdb_handle_typebuf(Evas_Object *gui)
|
||||
/* What to do about multi-word directories? */
|
||||
dir = ecdb_strip_string(ext);
|
||||
|
||||
if ((dir) && (dir[0] == '/'))
|
||||
{
|
||||
if (ecore_file_exists(dir))
|
||||
{
|
||||
ewl_filelist_directory_set(EWL_FILELIST(fl), dir);
|
||||
}
|
||||
}
|
||||
else if (dir[0] == '~')
|
||||
{
|
||||
char path[PATH_MAX];
|
||||
|
||||
snprintf(path, PATH_MAX, "%s%s", getenv("HOME"), &dir[1]);
|
||||
|
||||
if (ecore_file_exists(path))
|
||||
{
|
||||
ewl_filelist_directory_set(EWL_FILELIST(fl), path);
|
||||
}
|
||||
}
|
||||
else if (dir)
|
||||
{
|
||||
/* Try to concate it to our current directory */
|
||||
char path[PATH_MAX];
|
||||
|
||||
snprintf(path, PATH_MAX, "%s/%s", ewl_filelist_directory_get
|
||||
(EWL_FILELIST(fl)), dir);
|
||||
|
||||
if (ecore_file_exists(path))
|
||||
{
|
||||
ewl_filelist_directory_set(EWL_FILELIST(fl), path);
|
||||
}
|
||||
}
|
||||
|
||||
if (dir)
|
||||
{
|
||||
if (dir[0] == '/')
|
||||
{
|
||||
if (ecore_file_exists(dir))
|
||||
{
|
||||
ewl_filelist_directory_set(EWL_FILELIST(fl), dir);
|
||||
}
|
||||
}
|
||||
else if (dir[0] == '~')
|
||||
{
|
||||
char path[PATH_MAX];
|
||||
|
||||
snprintf(path, PATH_MAX, "%s%s", getenv("HOME"), &dir[1]);
|
||||
|
||||
if (ecore_file_exists(path))
|
||||
{
|
||||
ewl_filelist_directory_set(EWL_FILELIST(fl), path);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Try to concate it to our current directory */
|
||||
char path[PATH_MAX];
|
||||
|
||||
snprintf(path, PATH_MAX, "%s/%s", ewl_filelist_directory_get
|
||||
(EWL_FILELIST(fl)), dir);
|
||||
|
||||
if (ecore_file_exists(path))
|
||||
{
|
||||
ewl_filelist_directory_set(EWL_FILELIST(fl), path);
|
||||
}
|
||||
}
|
||||
|
||||
FREE(dir);
|
||||
}
|
||||
|
||||
@@ -542,7 +542,7 @@ ecdb_gui_controls_enable(const char **ids, int n)
|
||||
}
|
||||
}
|
||||
|
||||
Evas_Object *
|
||||
void
|
||||
ecdb_gui_combo_header_from_drive(Evas_Object *c, const char *name, void *data,
|
||||
Evas_Object *obj, int sel)
|
||||
{
|
||||
@@ -553,11 +553,9 @@ ecdb_gui_combo_header_from_drive(Evas_Object *c, const char *name, void *data,
|
||||
drive = eina_list_nth(em->drives, sel);
|
||||
ecdb_label_text_set(ret, drive->product);
|
||||
evas_object_show(ret);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
Evas_Object *
|
||||
void
|
||||
ecdb_gui_combo_header_from_speeds(Evas_Object *c, const char *name, void *data,
|
||||
Evas_Object *obj, int sel)
|
||||
{
|
||||
@@ -568,13 +566,11 @@ ecdb_gui_combo_header_from_speeds(Evas_Object *c, const char *name, void *data,
|
||||
drive = data;
|
||||
|
||||
if (!drive)
|
||||
return NULL;
|
||||
return;
|
||||
|
||||
ret = ecdb_label_add(c, name);
|
||||
snprintf(buf, sizeof(buf), "%d", ecdb_speed_convert(drive, sel));
|
||||
ecdb_label_text_set(ret, buf);
|
||||
evas_object_show(ret);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user