discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=40f8e02be8dcc5b3c25b41b32870d5ab88cf1787

commit 40f8e02be8dcc5b3c25b41b32870d5ab88cf1787
Author: Mike Blumenkrantz <[email protected]>
Date:   Fri Jan 6 12:56:22 2017 -0500

    resolve misc float-equal warnings
    
    Reviewed-by: Derek Foreman <[email protected]>
---
 src/bin/e_color.c           | 2 +-
 src/bin/e_config.c          | 2 +-
 src/bin/e_int_client_prop.c | 2 +-
 src/bin/e_int_config_comp.c | 4 ++--
 src/bin/e_powersave.c       | 2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/bin/e_color.c b/src/bin/e_color.c
index 6f54797..f0b4011 100644
--- a/src/bin/e_color.c
+++ b/src/bin/e_color.c
@@ -11,7 +11,7 @@ void
 e_color_update_hsv(E_Color *ec)
 {
    if (!ec) return;
-   if (ec->v == 0)
+   if (!EINA_FLT_NONZERO(ec->v))
      ec->r = ec->g = ec->b = 0;
    else
      evas_color_hsv_to_rgb(ec->h, ec->s, ec->v, &(ec->r), &(ec->g), &(ec->b));
diff --git a/src/bin/e_config.c b/src/bin/e_config.c
index 06eceef..73a3d1b 100644
--- a/src/bin/e_config.c
+++ b/src/bin/e_config.c
@@ -2118,7 +2118,7 @@ e_config_binding_edge_match(E_Config_Binding_Edge *eb_in)
             (eb->modifiers == eb_in->modifiers) &&
             (eb->any_mod == eb_in->any_mod) &&
             (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->action) && (eb_in->action) && (!strcmp(eb->action, 
eb_in->action))) ||
              ((!eb->action) && (!eb_in->action))) &&
diff --git a/src/bin/e_int_client_prop.c b/src/bin/e_int_client_prop.c
index 1388ef9..ccf1835 100644
--- a/src/bin/e_int_client_prop.c
+++ b/src/bin/e_int_client_prop.c
@@ -137,7 +137,7 @@ _create_data(E_Dialog *cfd, E_Client *ec)
    if ((cfdata->client->icccm.min_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"),
                    cfdata->client->icccm.min_aspect);
         else
diff --git a/src/bin/e_int_config_comp.c b/src/bin/e_int_config_comp.c
index 057d993..93f6120 100644
--- a/src/bin/e_int_config_comp.c
+++ b/src/bin/e_int_config_comp.c
@@ -426,7 +426,7 @@ _advanced_apply_data(E_Config_Dialog *cfd  EINA_UNUSED,
        (cfdata->fps_show != conf->fps_show) ||
        (cfdata->fps_corner != conf->fps_corner) ||
        (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_borders != cfdata->match.disable_borders) ||
        (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_corner != conf->fps_corner) ||
        (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)
diff --git a/src/bin/e_powersave.c b/src/bin/e_powersave.c
index d51c082..c3a3a77 100644
--- a/src/bin/e_powersave.c
+++ b/src/bin/e_powersave.c
@@ -162,7 +162,7 @@ _e_powersave_mode_eval(void)
         return;
         break;
      }
-   if (t != defer_time)
+   if (!EINA_DBL_CMP(t, defer_time))
      {
         if (deferred_timer) ecore_timer_del(deferred_timer);
         deferred_timer = ecore_timer_add(defer_time,

-- 


Reply via email to