bdilly pushed a commit to branch master. http://git.enlightenment.org/games/eskiss.git/commit/?id=881510e93d43b81d9550aa1b273d1f1997b30370
commit 881510e93d43b81d9550aa1b273d1f1997b30370 Author: Bruno Dilly <bdi...@profusion.mobi> Date: Mon Oct 17 15:05:29 2016 -0200 Fix casts Avoid build warnings like: physic_object.c: In function ‘physic_object_circle_add’: physic_object.c:236:33: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] shape->collision_type = (int)pobj; collision_type is a uintptr_t --- src/bin/physic_object.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/bin/physic_object.c b/src/bin/physic_object.c index 15a6532..1f365e5 100644 --- a/src/bin/physic_object.c +++ b/src/bin/physic_object.c @@ -157,7 +157,7 @@ PhysicObject *physic_object_drawing_add(Evas_Object *obj, DrawPoint center, Eina shape->u = 0.6f; //Friction // shape->group = number_of_element; shape->data = pobj; - shape->collision_type = (int)pobj; + shape->collision_type = (uintptr_t)pobj; pobj->shapes = eina_list_append(pobj->shapes, shape); } @@ -233,7 +233,7 @@ PhysicObject *physic_object_circle_add(Evas_Object *obj, DrawPoint center, doubl shape->u = 0.6f; //Friction // shape->group = number_of_element; shape->data = pobj; - shape->collision_type = (int)pobj; + shape->collision_type = (uintptr_t)pobj; pobj->shapes = eina_list_append(pobj->shapes, shape); @@ -360,7 +360,7 @@ PhysicObject *physic_object_segment_add(Evas_Object *obj, DrawPoint center, Eina shape->u = 0.8f; //Friction // shape->group = number_of_element; shape->data = pobj; - shape->collision_type = (int)pobj; + shape->collision_type = (uintptr_t)pobj; pobj->shapes = eina_list_append(pobj->shapes, shape); @@ -424,7 +424,7 @@ void physic_object_collision_callback_set(PhysicObject *pobj, PhysicObject *pobj return; } - cpSpaceAddCollisionHandler(space, (int)pobj, (int)pobj2, _collision_begin_cb, NULL, NULL, NULL, pobj); + cpSpaceAddCollisionHandler(space, (uintptr_t)pobj, (uintptr_t)pobj2, _collision_begin_cb, NULL, NULL, NULL, pobj); pobj->collision_callback = cb; pobj->collision_data = data; --