ephysics: fix unused vars and parameters

SVN revision: 76154
This commit is contained in:
Bruno Dilly 2012-09-04 22:42:28 +00:00
parent 06d88ea834
commit d42b1c51c2
6 changed files with 15 additions and 27 deletions

View File

@ -2,7 +2,7 @@
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
m4_define([v_maj], [0])
m4_define([v_min], [1])
m4_define([v_mic], [0])
m4_define([v_mic], [99])
m4_define([v_rev], m4_esyscmd([(svnversion "${SVN_REPO_PATH:-.}" | grep -v '\(export\|Unversioned directory\)' || echo 0) | awk -F : '{printf("%s\n", $1);}' | tr -d ' :MSP\n']))
m4_if(v_rev, [0], [m4_define([v_rev], m4_esyscmd([git log 2> /dev/null | (grep -m1 git-svn-id || echo 0) | sed -e 's/.*@\([0-9]*\).*/\1/' | tr -d '\n']))])
##-- When released, remove the dnl on the below line
@ -83,9 +83,9 @@ AC_DEFINE_UNQUOTED(MODULE_ARCH, "${MODULE_ARCH}", "Module architecture")
m4_ifdef([v_mic],
[
EFL_COMPILER_FLAG([-Wshadow])
EFL_COMPILER_FLAG([-Wall])
EFL_COMPILER_FLAG([-Wextra])
EFL_COMPILER_FLAG([-Wunused])
EFL_COMPILER_FLAG([-W])
])

View File

@ -12,7 +12,10 @@ AC_DEFUN([EFL_COMPILER_FLAG],
CFLAGS_save="${CFLAGS}"
CFLAGS="${CFLAGS} $1"
CPPFLAGS_save="${CPPFLAGS}"
CPPFLAGS="${CPPFLAGS} $1"
AC_LANG_PUSH([C])
AC_MSG_CHECKING([whether the compiler supports $1])

View File

@ -103,8 +103,6 @@ _ephysics_body_event_callback_call(EPhysics_Body *body, EPhysics_Callback_Body_T
void
ephysics_body_active_set(EPhysics_Body *body, Eina_Bool active)
{
EPhysics_Body_Callback *cb;
if (body->active == !!active) return;
body->active = !!active;
if (active) return;
@ -116,9 +114,8 @@ ephysics_body_active_set(EPhysics_Body *body, Eina_Bool active)
Eina_Bool
ephysics_body_filter_collision(EPhysics_Body *body0, EPhysics_Body *body1)
{
void *grp;
Eina_Iterator *it;
Eina_List *l;
void *grp;
if ((!body0->collision_groups) || (!body1->collision_groups))
return EINA_TRUE;
@ -643,7 +640,6 @@ void
ephysics_body_contact_processed(EPhysics_Body *body, EPhysics_Body *contact_body, btVector3 position)
{
EPhysics_Body_Collision *collision;
EPhysics_Body_Callback *cb;
EPhysics_World *world;;
double rate;
int wy, wh;
@ -687,7 +683,7 @@ ephysics_body_soft_body_get(const EPhysics_Body *body)
}
static EPhysics_Body *
_ephysics_body_soft_add(EPhysics_World *world, btCollisionShape *collision_shape, btSoftBody *soft_body, const char *type)
_ephysics_body_soft_add(EPhysics_World *world, btCollisionShape *collision_shape, btSoftBody *soft_body)
{
EPhysics_Body *body;
btSoftBody::AJoint::Specs angular_joint;
@ -761,7 +757,7 @@ ephysics_body_soft_circle_add(EPhysics_World *world)
goto no_soft_body;
}
body = _ephysics_body_soft_add(world, shape, soft_body, "soft circle");
body = _ephysics_body_soft_add(world, shape, soft_body);
if (!body)
goto no_body;
@ -843,7 +839,7 @@ ephysics_body_soft_box_add(EPhysics_World *world)
goto no_soft_body;
}
body = _ephysics_body_soft_add(world, shape, soft_body, "soft box");
body = _ephysics_body_soft_add(world, shape, soft_body);
if (!body)
goto no_body;
@ -1077,8 +1073,6 @@ ephysics_body_right_boundary_add(EPhysics_World *world)
void
ephysics_orphan_body_del(EPhysics_Body *body)
{
EPhysics_Body_Callback *cb;
_ephysics_body_event_callback_call(body, EPHYSICS_CALLBACK_BODY_DEL,
(void *) body->evas_obj);
_ephysics_body_del(body);
@ -1290,8 +1284,6 @@ ephysics_body_mass_get(const EPhysics_Body *body)
EAPI void
ephysics_body_linear_velocity_set(EPhysics_Body *body, double x, double y)
{
double rate;
if (!body)
{
ERR("Can't set body linear velocity, body is null.");
@ -1788,15 +1780,12 @@ ephysics_body_force_apply(EPhysics_Body *body, double x, double y, Evas_Coord po
EAPI void
ephysics_body_torque_apply(EPhysics_Body *body, double torque)
{
double rate;
if (!body)
{
ERR("Can't apply force to a null body.");
return;
}
rate = ephysics_world_rate_get(body->world);
ephysics_body_forces_apply(body);
body->rigid_body->applyTorque(btVector3(0, 0, -torque));
_ephysics_body_forces_update(body);

View File

@ -20,7 +20,7 @@ struct _EPhysics_Camera {
};
static void
_ephysics_camera_target_del_cb(void *data, EPhysics_Body *body, void *event_info)
_ephysics_camera_target_del_cb(void *data, EPhysics_Body *body, void *event_info __UNUSED__)
{
EPhysics_Camera *camera = (EPhysics_Camera *) data;

View File

@ -94,7 +94,7 @@ ephysics_shape_point_add(EPhysics_Shape *shape, double x, double y)
/* TODO: load points from file */
EAPI EPhysics_Shape *
ephysics_shape_load(const char *filename)
ephysics_shape_load(const char *filename __UNUSED__)
{
EPhysics_Shape *shape;
@ -107,7 +107,7 @@ ephysics_shape_load(const char *filename)
/* TODO: save points to file */
EAPI Eina_Bool
ephysics_shape_save(const EPhysics_Shape *shape, const char *filename)
ephysics_shape_save(const EPhysics_Shape *shape __UNUSED__, const char *filename __UNUSED__)
{
return EINA_TRUE;
}

View File

@ -143,11 +143,10 @@ _ephysics_world_event_callback_del(EPhysics_World *world, EPhysics_World_Callbac
}
static void
_ephysics_world_tick_cb(btDynamicsWorld *dynamics_world, btScalar timeStep)
_ephysics_world_tick_cb(btDynamicsWorld *dynamics_world, btScalar timeStep __UNUSED__)
{
Eina_Bool world_active, camera_moved, tx, ty;
btCollisionObjectArray objects;
EPhysics_World_Callback *cb;
btRigidBody *rigid_body;
EPhysics_World *world;
EPhysics_Body *body;
@ -253,7 +252,6 @@ static Eina_Bool
_simulate_worlds(void *data __UNUSED__)
{
EPhysics_World *world;
double time_now;
void *wrld, *bd;
ephysics_init();
@ -327,7 +325,7 @@ _ephysics_world_contact_processed_cb(btManifoldPoint &cp, void *b0, void *b1)
}
static void
_ephysics_world_boundary_del_cb(void *data, EPhysics_Body *body, void *event_info)
_ephysics_world_boundary_del_cb(void *data, EPhysics_Body *body, void *event_info __UNUSED__)
{
EPhysics_World *world = (EPhysics_World *) data;
int i;
@ -640,8 +638,6 @@ ephysics_world_serialize(const EPhysics_World *world, const char *path)
EAPI void
ephysics_world_del(EPhysics_World *world)
{
EPhysics_World_Callback *cb;
if (!world)
{
ERR("Can't delete world, it wasn't provided.");