Enlightenment CVS committal
Author : devilhorns
Project : e17
Module : apps/e
Dir : e17/apps/e/src/modules/conf_theme
Modified Files:
e_int_config_theme.c
Log Message:
Fix compiler warnings by initializing some variables & using evas_stringshare.
===================================================================
RCS file: /cvs/e/e17/apps/e/src/modules/conf_theme/e_int_config_theme.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- e_int_config_theme.c 3 Aug 2007 05:34:33 -0000 1.5
+++ e_int_config_theme.c 23 Aug 2007 10:26:36 -0000 1.6
@@ -767,7 +767,7 @@
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 @@
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,16 +946,16 @@
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;
}
}
if (!themes)
- cfdata->theme_list = evas_list_append(cfdata->theme_list, newtheme);
+ cfdata->theme_list = evas_list_append(cfdata->theme_list, newtheme);
else
- free(newtheme);
+ free(newtheme);
return;
}
@@ -969,7 +969,7 @@
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 @@
{
if (t->file)
{
- filename = strdup(t->file);
+ filename = evas_stringshare_add(t->file);
free((void *)(t->file));
t->file = NULL;
}
@@ -1006,6 +1006,7 @@
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;
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs