Here are three patches for Enlightenment:
01 Removes unused variables, drops duplicate return or break
statements and drops unnecessary checks.
02 Fixes potential invalid memory reads.
03 Fixes a typo.
In addition, I'm not sure if this ok or not, but Enlightenment
can not be compiled with EFL-1.7 anymore:
--------------------------------------
CC e_mod_comp_cfdata.lo
../../../src/modules/comp/e_mod_comp_cfdata.c: In function
'e_mod_comp_cfdata_config_new':
../../../src/modules/comp/e_mod_comp_cfdata.c:83:21: error:
'ECORE_EVAS_GL_X11_SWAP_MODE_AUTO' undeclared (first use in this function)
../../../src/modules/comp/e_mod_comp_cfdata.c:83:21: note: each undeclared
identifier is reported only once for each function it appears in
--------------------------------------
-- Igor
Index: src/bin/e_zone.c
===================================================================
--- src/bin/e_zone.c (revision 77434)
+++ src/bin/e_zone.c (working copy)
@@ -1296,7 +1296,6 @@
if (yy1 > zone->h - shelf->h)
yy1 = zone->h - shelf->h;
break;
- break;
case E_GADCON_ORIENT_LEFT:
case E_GADCON_ORIENT_CORNER_LT:
Index: src/modules/battery/batget.c
===================================================================
--- src/modules/battery/batget.c (revision 77434)
+++ src/modules/battery/batget.c (working copy)
@@ -272,8 +272,6 @@
bsd_apm_check(void)
{
int ac_stat, bat_stat, bat_val, time_val;
- char buf[4096];
- int hours, minutes;
int apm_fd = -1;
struct apm_info info;
@@ -357,7 +355,6 @@
const void *values;
int device_num, device_count;
int currentval = 0, maxval = 0;
- char buf[4096];
CFTypeRef blob;
CFArrayRef sources;
CFDictionaryRef device_dict;
Index: src/modules/conf_theme/e_int_config_scale.c
===================================================================
--- src/modules/conf_theme/e_int_config_scale.c (revision 77434)
+++ src/modules/conf_theme/e_int_config_scale.c (working copy)
@@ -386,7 +386,6 @@
(cfdata->max != e_config->scale.max) ||
(cfdata->factor != e_config->scale.factor) ||
(cfdata->base_dpi != e_config->scale.base_dpi);
- return 1;
}
static void
Index: src/modules/cpufreq/e_mod_main.c
===================================================================
--- src/modules/cpufreq/e_mod_main.c (revision 77434)
+++ src/modules/cpufreq/e_mod_main.c (working copy)
@@ -597,7 +597,7 @@
#elif defined (__FreeBSD__)
int freq;
size_t len = sizeof(buf);
- char *freqs, *pos, *q;
+ char *pos, *q;
/* read freq_levels sysctl and store it in freq */
if (sysctlbyname("dev.cpu.0.freq_levels", buf, &len, NULL, 0) == 0)
Index: src/modules/fileman/e_mod_menu.c
===================================================================
--- src/modules/fileman/e_mod_menu.c (revision 77434)
+++ src/modules/fileman/e_mod_menu.c (working copy)
@@ -274,7 +274,7 @@
e_menu_item_callback_set(mi, _e_mod_menu_gtk_cb,
(void *)eina_stringshare_add(uri->path));
e_menu_item_submenu_pre_callback_set(mi, _e_mod_menu_populate, eina_stringshare_add("/"));
- if (uri) efreet_uri_free(uri);
+ efreet_uri_free(uri);
}
fclose(fp);
}
Index: src/modules/illume-keyboard/e_kbd_dict.c
===================================================================
--- src/modules/illume-keyboard/e_kbd_dict.c (revision 77434)
+++ src/modules/illume-keyboard/e_kbd_dict.c (working copy)
@@ -153,7 +153,6 @@
kw1 = d1;
kw2 = d2;
return _e_kbd_dict_normalized_strcmp(kw1->word, kw2->word);
- return 0;
}
static const char *
Index: src/modules/xkbswitch/e_mod_main.c
===================================================================
--- src/modules/xkbswitch/e_mod_main.c (revision 77434)
+++ src/modules/xkbswitch/e_mod_main.c (working copy)
@@ -496,7 +496,6 @@
if (!inst) return;
e_gadcon_locked_set(inst->gcc->gadcon, 0);
- if (!(inst) || !inst->lmenu) return;
inst->lmenu = NULL;
}
Index: src/bin/e_exec.c
===================================================================
--- src/bin/e_exec.c (revision 77434)
+++ src/bin/e_exec.c (working copy)
@@ -158,15 +158,13 @@
EINA_LIST_FOREACH(e_border_client_list(), l, bd)
{
- if (bd->desktop == desktop)
+ if (bd && bd->desktop == desktop)
{
- if (bd)
- {
- if (!bd->focused)
- e_border_activate(bd, EINA_TRUE);
- else e_border_raise(bd);
- return NULL;
- }
+ if (!bd->focused)
+ e_border_activate(bd, EINA_TRUE);
+ else
+ e_border_raise(bd);
+ return NULL;
}
}
}
Index: src/bin/e_fm/e_fm_main_eeze.c
===================================================================
--- src/bin/e_fm/e_fm_main_eeze.c (revision 77434)
+++ src/bin/e_fm/e_fm_main_eeze.c (working copy)
@@ -532,9 +532,10 @@
void
_e_fm_main_eeze_volume_unmount(E_Volume *v)
{
- INF("unmount %s %s", v->udi, v->mount_point);
if (!v || v->guard) return;
+ INF("unmount %s %s", v->udi, v->mount_point);
+
if (!eeze_disk_mount_wrapper_get(v->disk))
{
char buf[PATH_MAX];
Index: src/bin/e_module.c
===================================================================
--- src/bin/e_module.c (revision 77434)
+++ src/bin/e_module.c (working copy)
@@ -113,7 +113,7 @@
E_Module *m;
char buf[PATH_MAX];
char body[4096], title[1024];
- const char *modpath;
+ const char *modpath = NULL;
char *s;
Eina_List *l;
E_Config_Module *em;
Index: src/modules/everything/evry.c
===================================================================
--- src/modules/everything/evry.c (revision 77434)
+++ src/modules/everything/evry.c (working copy)
@@ -2582,15 +2582,9 @@
static void
_evry_view_hide(Evry_Window *win, Evry_View *v, int slide)
{
- if (v->state->delete_me)
- {
- _evry_state_clear(win);
- return;
- }
-
_evry_state_clear(win);
- if (!v) return;
+ if (!v || v->state->delete_me) return;
if (slide && v->o_list)
{
Index: src/modules/everything/evry_plug_files.c
===================================================================
--- src/modules/everything/evry_plug_files.c (revision 77449)
+++ src/modules/everything/evry_plug_files.c (working copy)
@@ -698,12 +698,12 @@
_folder_item_add(p, p->directory, prio++);
+ buf[sizeof buf - 1] = 0;
while (strlen(buf) > 1)
{
- buf[sizeof buf - 1] = 0;
dir = dirname(buf);
_folder_item_add(p, dir, prio++);
- strncpy(buf, dir, sizeof buf - 1);
+ strcpy(buf, dir);
}
p->command = CMD_SHOW_PARENT;
Index: src/modules/illume2/policies/illume/policy.c
===================================================================
--- src/modules/illume2/policies/illume/policy.c (revision 77434)
+++ src/modules/illume2/policies/illume/policy.c (working copy)
@@ -1234,10 +1234,10 @@
{
E_Border *sft;
+ if (!bd) return;
+
printf("Border Activate: %s\n", bd->client.icccm.name);
- if (!bd) return;
-
/* NB: stolen borders may or may not need focus call...have to test */
if (bd->stolen) return;
Index: src/modules/gadman/e_mod_gadman.c
===================================================================
--- src/modules/gadman/e_mod_gadman.c (revision 77434)
+++ src/modules/gadman/e_mod_gadman.c (working copy)
@@ -507,7 +507,7 @@
"e,state,visibility,hide", "e");
else
edje_object_signal_emit(Man->full_bg,
- "e,state,visibility,hide", "e");
+ "e,state,visibility,hide,now", "e");
}
else
{
------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel