forked from enlightenment/enlightenment
Fix compiler warnings by initializing some variables & using evas_stringshare.
SVN revision: 31472
This commit is contained in:
parent
dddbaba999
commit
fc94c55d57
|
@ -767,7 +767,7 @@ _ilist_files_add(E_Config_Dialog_Data *cfdata, const char *header, const char *d
|
|||
DIR *d = NULL;
|
||||
struct dirent *dentry = NULL;
|
||||
Evas_List *themefiles = NULL;
|
||||
int count;
|
||||
int count = 0;
|
||||
char themename[1024];
|
||||
char *tmp;
|
||||
Evas_Object *o;
|
||||
|
@ -930,14 +930,14 @@ _cb_adv_btn_assign(void *data1, void *data2)
|
|||
|
||||
for (themes = cfdata->theme_list; themes; themes = themes->next)
|
||||
{
|
||||
char * filename;
|
||||
const char *filename = NULL;
|
||||
|
||||
t = themes->data;
|
||||
if (!strcmp(t->category, newtheme->category))
|
||||
{
|
||||
if ((t->file) && (strcmp(t->file, newtheme->file)))
|
||||
{
|
||||
filename = strdup(t->file);
|
||||
filename = evas_stringshare_add(t->file);
|
||||
free((void *)(t->file));
|
||||
t->file = NULL;
|
||||
if (!_theme_file_used(cfdata->theme_list, filename))
|
||||
|
@ -946,9 +946,9 @@ _cb_adv_btn_assign(void *data1, void *data2)
|
|||
if (!strcmp(filename, _files_ilist_nth_label_to_file(cfdata, n)))
|
||||
e_widget_ilist_nth_icon_set(of, n, NULL);
|
||||
}
|
||||
free(filename);
|
||||
}
|
||||
t->file = strdup(newtheme->file);
|
||||
if (filename) evas_stringshare_del(filename);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -969,7 +969,7 @@ _cb_adv_btn_clear(void *data1, void *data2)
|
|||
Evas_Object *oc = NULL, *of = NULL;
|
||||
char cat[1024];
|
||||
const char *label;
|
||||
const char *filename;
|
||||
const char *filename = NULL;
|
||||
int n;
|
||||
|
||||
cfdata = data1;
|
||||
|
@ -993,7 +993,7 @@ _cb_adv_btn_clear(void *data1, void *data2)
|
|||
{
|
||||
if (t->file)
|
||||
{
|
||||
filename = strdup(t->file);
|
||||
filename = evas_stringshare_add(t->file);
|
||||
free((void *)(t->file));
|
||||
t->file = NULL;
|
||||
}
|
||||
|
@ -1006,6 +1006,7 @@ _cb_adv_btn_clear(void *data1, void *data2)
|
|||
for (n = 0; n < e_widget_ilist_count(of); n++)
|
||||
if (!strcmp(filename, _files_ilist_nth_label_to_file(cfdata, n)))
|
||||
e_widget_ilist_nth_icon_set(of, n, NULL);
|
||||
evas_stringshare_del(filename);
|
||||
}
|
||||
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue