aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2015-02-18 22:16:48 +0100
committerCedric BAIL <cedric@osg.samsung.com>2015-02-18 22:42:17 +0100
commitd6f2dd4dd07dee11eb4121d950f37a534d43dadb (patch)
tree56a383cd7914899b015cf87e7437a4c844dcbfd5
parentevas: Evas_3D - improve Shooter example. (diff)
downloadefl-d6f2dd4dd07dee11eb4121d950f37a534d43dadb.tar.gz
evas: remove compilation warning.
-rw-r--r--src/examples/evas/evas-3d-shadows.c10
-rw-r--r--src/examples/evas/shooter/evas-3d-shooter.c4
-rw-r--r--src/modules/evas/model_loaders/obj/evas_model_load_obj.c6
3 files changed, 11 insertions, 9 deletions
diff --git a/src/examples/evas/evas-3d-shadows.c b/src/examples/evas/evas-3d-shadows.c
index 960186dccf..ec37f2ebd0 100644
--- a/src/examples/evas/evas-3d-shadows.c
+++ b/src/examples/evas/evas-3d-shadows.c
@@ -59,7 +59,7 @@ typedef struct _Scene_Data
} Scene_Data;
Eina_Bool
-_cb_clicked(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info)
+_cb_clicked(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info)
{
Eina_List *meshes = NULL, *l;
Evas_3D_Mesh *m;
@@ -78,10 +78,11 @@ _cb_clicked(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_i
choosed_node = (Evas_3D_Node *)event_info;
}
+ return EINA_TRUE;
}
Eina_Bool
-_cb_collision(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info)
+_cb_collision(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info)
{
Eina_List *meshes = NULL, *l;
Evas_3D_Mesh *m;
@@ -90,6 +91,8 @@ _cb_collision(void *data, Eo *obj, const Eo_Event_Description *desc, void *event
{
eo_do(m, evas_3d_mesh_shade_mode_set(EVAS_3D_SHADE_MODE_DIFFUSE));
}
+
+ return EINA_TRUE;
}
static void
@@ -344,9 +347,8 @@ _scene_setup(Scene_Data *data)
}
static void
-_on_key_down(void *data, Evas *e EINA_UNUSED, Evas_Object *eo EINA_UNUSED, void *event_info)
+_on_key_down(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *eo EINA_UNUSED, void *event_info)
{
- Scene_Data *scene = (Scene_Data *)data;
Evas_Event_Key_Down *ev = event_info;
if (!strcmp("w", ev->key))
{
diff --git a/src/examples/evas/shooter/evas-3d-shooter.c b/src/examples/evas/shooter/evas-3d-shooter.c
index 9debe8f4a5..a3e7e453b7 100644
--- a/src/examples/evas/shooter/evas-3d-shooter.c
+++ b/src/examples/evas/shooter/evas-3d-shooter.c
@@ -303,7 +303,7 @@ _key_down(void *data,
}
static void
-_key_up(void *data,
+_key_up(void *data EINA_UNUSED,
Evas *e EINA_UNUSED,
Evas_Object *eo EINA_UNUSED,
void *event_info)
@@ -1151,7 +1151,7 @@ _mesh_setup_grass(Scene_Data *data)
}
void
-_mesh_setup(Scene_Data *data, float h, float w, float d, float *isource, int index)
+_mesh_setup(Scene_Data *data, float h EINA_UNUSED, float w EINA_UNUSED, float d EINA_UNUSED, float *isource, int index)
{
/* Setup mesh. */
diff --git a/src/modules/evas/model_loaders/obj/evas_model_load_obj.c b/src/modules/evas/model_loaders/obj/evas_model_load_obj.c
index 24f38c4cc7..b88f95b617 100644
--- a/src/modules/evas/model_loaders/obj/evas_model_load_obj.c
+++ b/src/modules/evas/model_loaders/obj/evas_model_load_obj.c
@@ -224,11 +224,11 @@ evas_model_load_file_obj(Evas_3D_Mesh *mesh, Eina_File *file)
Eina_Bool will_check_next_char = EINA_FALSE;
Eina_Bool first_char_is_v = EINA_FALSE;
Eina_Bool first_char_is_f = EINA_FALSE;
- float *pos, *nor, *tex;
- int stride_pos, stride_nor, stride_tex;
+ float *pos = NULL, *nor = NULL, *tex = NULL;
+ int stride_pos = 0, stride_nor = 0, stride_tex = 0;
int j, k, data_for_one_point;
char *current, *map;
- float *_vertices_obj, *_normales_obj, *_tex_coords_obj;
+ float *_vertices_obj = NULL, *_normales_obj = NULL, *_tex_coords_obj = NULL;
int *_triangles;
map = eina_file_map_all(file, EINA_FILE_SEQUENTIAL);