Efreet: Silence clang warning
authorJean-Philippe Andre <jp.andre@samsung.com>
Tue, 21 Apr 2015 11:32:54 +0000 (20:32 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Tue, 21 Apr 2015 11:32:54 +0000 (20:32 +0900)
[unsigned - unsigned] is unsigned and might wrap around, the implicit
conversion to int (by calling abs()) saved the game here.

src/lib/efreet/efreet_icon.c

index 4ad8a6bf7bf743a3636f4f64422c27bd63f0420c..89e87f015b378e10cfae0595888a184b55db9239 100644 (file)
@@ -612,7 +612,7 @@ static double
 efreet_icon_size_distance(Efreet_Cache_Icon_Element *elem, unsigned int size)
 {
     if (elem->type == EFREET_ICON_SIZE_TYPE_FIXED)
-        return (abs(elem->normal - size));
+        return (abs((int) elem->normal - (int) size));
 
     if ((elem->type == EFREET_ICON_SIZE_TYPE_SCALABLE) ||
         (elem->type == EFREET_ICON_SIZE_TYPE_THRESHOLD))