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.
This commit is contained in:
Carsten Haitzler 2017-02-11 13:13:19 +09:00
parent b3f0db816a
commit eb3f6f06f1
1 changed files with 2 additions and 1 deletions

View File

@ -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++;
}
}