projects
/
platform
/
upstream
/
efl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
255e71d
)
Efreet: Silence clang warning
author
Jean-Philippe Andre
<jp.andre@samsung.com>
Tue, 21 Apr 2015 11:32:54 +0000
(20:32 +0900)
committer
Jean-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
patch
|
blob
|
history
diff --git
a/src/lib/efreet/efreet_icon.c
b/src/lib/efreet/efreet_icon.c
index 4ad8a6bf7bf743a3636f4f64422c27bd63f0420c..89e87f015b378e10cfae0595888a184b55db9239 100644
(file)
--- a/
src/lib/efreet/efreet_icon.c
+++ b/
src/lib/efreet/efreet_icon.c
@@
-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))