englebass pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=9e0a00d768b90917a0b190420c65db8d4c640ed2

commit 9e0a00d768b90917a0b190420c65db8d4c640ed2
Author: Sebastian Dransfeld <s...@tango.flipp.net>
Date:   Mon May 11 13:31:21 2015 +0200

    efreet: fix signed warning
    
    Update to 6a0d23. Casting to int isn't a real solution, since we could
    have values which overflows.
    
    Since we want the absolute value, just make sure we subtract the larger
    value from the smaller.
---
 src/lib/efreet/efreet_icon.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/lib/efreet/efreet_icon.c b/src/lib/efreet/efreet_icon.c
index 89e87f0..3cb7f5c 100644
--- a/src/lib/efreet/efreet_icon.c
+++ b/src/lib/efreet/efreet_icon.c
@@ -612,7 +612,10 @@ static double
 efreet_icon_size_distance(Efreet_Cache_Icon_Element *elem, unsigned int size)
 {
     if (elem->type == EFREET_ICON_SIZE_TYPE_FIXED)
-        return (abs((int) elem->normal - (int) size));
+    {
+        if (elem->normal > size) return elem->normal - size;
+        else return size - elem->normal;
+    }
 
     if ((elem->type == EFREET_ICON_SIZE_TYPE_SCALABLE) ||
         (elem->type == EFREET_ICON_SIZE_TYPE_THRESHOLD))

-- 


Reply via email to