resolve misc float-equal warnings

Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
This commit is contained in:
Mike Blumenkrantz 2017-01-06 12:56:22 -05:00
parent 7264ac9e96
commit 40f8e02be8
5 changed files with 6 additions and 6 deletions

View File

@ -11,7 +11,7 @@ void
e_color_update_hsv(E_Color *ec) e_color_update_hsv(E_Color *ec)
{ {
if (!ec) return; if (!ec) return;
if (ec->v == 0) if (!EINA_FLT_NONZERO(ec->v))
ec->r = ec->g = ec->b = 0; ec->r = ec->g = ec->b = 0;
else else
evas_color_hsv_to_rgb(ec->h, ec->s, ec->v, &(ec->r), &(ec->g), &(ec->b)); evas_color_hsv_to_rgb(ec->h, ec->s, ec->v, &(ec->r), &(ec->g), &(ec->b));

View File

@ -2118,7 +2118,7 @@ e_config_binding_edge_match(E_Config_Binding_Edge *eb_in)
(eb->modifiers == eb_in->modifiers) && (eb->modifiers == eb_in->modifiers) &&
(eb->any_mod == eb_in->any_mod) && (eb->any_mod == eb_in->any_mod) &&
(eb->edge == eb_in->edge) && (eb->edge == eb_in->edge) &&
(eb->delay == eb_in->delay) && EINA_FLT_CMP(eb->delay, eb_in->delay) &&
(eb->drag_only == eb_in->drag_only) && (eb->drag_only == eb_in->drag_only) &&
(((eb->action) && (eb_in->action) && (!strcmp(eb->action, eb_in->action))) || (((eb->action) && (eb_in->action) && (!strcmp(eb->action, eb_in->action))) ||
((!eb->action) && (!eb_in->action))) && ((!eb->action) && (!eb_in->action))) &&

View File

@ -137,7 +137,7 @@ _create_data(E_Dialog *cfd, E_Client *ec)
if ((cfdata->client->icccm.min_aspect > 0.0) && if ((cfdata->client->icccm.min_aspect > 0.0) &&
(cfdata->client->icccm.max_aspect > 0.0)) (cfdata->client->icccm.max_aspect > 0.0))
{ {
if (cfdata->client->icccm.min_aspect == cfdata->client->icccm.max_aspect) if (EINA_DBL_CMP(cfdata->client->icccm.min_aspect, cfdata->client->icccm.max_aspect))
snprintf(buf, sizeof(buf), _("%1.3f"), snprintf(buf, sizeof(buf), _("%1.3f"),
cfdata->client->icccm.min_aspect); cfdata->client->icccm.min_aspect);
else else

View File

@ -426,7 +426,7 @@ _advanced_apply_data(E_Config_Dialog *cfd EINA_UNUSED,
(cfdata->fps_show != conf->fps_show) || (cfdata->fps_show != conf->fps_show) ||
(cfdata->fps_corner != conf->fps_corner) || (cfdata->fps_corner != conf->fps_corner) ||
(cfdata->fps_average_range != conf->fps_average_range) || (cfdata->fps_average_range != conf->fps_average_range) ||
(cfdata->first_draw_delay != conf->first_draw_delay) || (!EINA_DBL_CMP(cfdata->first_draw_delay, conf->first_draw_delay)) ||
(conf->match.disable_popups != cfdata->match.disable_popups) || (conf->match.disable_popups != cfdata->match.disable_popups) ||
(conf->match.disable_borders != cfdata->match.disable_borders) || (conf->match.disable_borders != cfdata->match.disable_borders) ||
(conf->match.disable_overrides != cfdata->match.disable_overrides) || (conf->match.disable_overrides != cfdata->match.disable_overrides) ||
@ -618,7 +618,7 @@ _basic_apply_data(E_Config_Dialog *cfd EINA_UNUSED,
(cfdata->fps_show != conf->fps_show) || (cfdata->fps_show != conf->fps_show) ||
(cfdata->fps_corner != conf->fps_corner) || (cfdata->fps_corner != conf->fps_corner) ||
(cfdata->fps_average_range != conf->fps_average_range) || (cfdata->fps_average_range != conf->fps_average_range) ||
(cfdata->first_draw_delay != conf->first_draw_delay) (!EINA_DBL_CMP(cfdata->first_draw_delay, conf->first_draw_delay))
) )
{ {
if (cfdata->match.toggle_changed) if (cfdata->match.toggle_changed)

View File

@ -162,7 +162,7 @@ _e_powersave_mode_eval(void)
return; return;
break; break;
} }
if (t != defer_time) if (!EINA_DBL_CMP(t, defer_time))
{ {
if (deferred_timer) ecore_timer_del(deferred_timer); if (deferred_timer) ecore_timer_del(deferred_timer);
deferred_timer = ecore_timer_add(defer_time, deferred_timer = ecore_timer_add(defer_time,