From: Carsten Haitzler (Rasterman) Date: Sat, 11 Feb 2017 04:13:19 +0000 (+0900) Subject: efl base class - fix warning about comparing differing sizes X-Git-Tag: upstream/1.20.0~2060 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=eb3f6f06f1308c474bb75c5bbd51caef37b1715d;p=platform%2Fupstream%2Fefl.git efl base class - fix warning about comparing differing sizes yes - we compare a difference between 2 ptrs and an index which is a uint. the safe thing here is to promote the unit to the ptrdiff_t type. reality is we cant have more than 2^32 cb's on an object anyway... so this should be ok. --- diff --git a/src/lib/eo/eo_base_class.c b/src/lib/eo/eo_base_class.c index eac4bbb..2f3803a 100644 --- a/src/lib/eo/eo_base_class.c +++ b/src/lib/eo/eo_base_class.c @@ -1150,7 +1150,8 @@ _eo_callbacks_sorted_insert(Efl_Object_Data *pd, Eo_Callback_Description *cb) // Update possible event emissions for (frame = pd->event_frame; frame; frame = frame->next) { - if (itr-pd->callbacks < frame->idx) frame->inserted_before++; + if ((itr - pd->callbacks) < (ptrdiff_t)frame->idx) + frame->inserted_before++; } }