summaryrefslogtreecommitdiff
path: root/src/modules/evas/model_loaders
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-08-02 18:40:25 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-08-02 18:48:06 +0900
commit800b877ed71698326e68071c50a511e4ac91bfd0 (patch)
treee9c093a74c6a7bd0d56b5bd702e154fa14960647 /src/modules/evas/model_loaders
parent91293d3b25e114caa6db28603bdd453537966018 (diff)
evas model loader - restructure code to silence warning
keep our build quiet warnings-wise and change the code to be so... so we see real warnings. not a bug... just a warning.
Diffstat (limited to 'src/modules/evas/model_loaders')
-rw-r--r--src/modules/evas/model_loaders/obj/evas_model_load_obj.c6
1 files changed, 4 insertions, 2 deletions
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 2b18c61..bdc246d 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
@@ -405,6 +405,8 @@ evas_model_load_file_obj(Evas_Canvas3D_Mesh *mesh, Eina_File *file)
405 { 405 {
406 float *p, *n, *t; 406 float *p, *n, *t;
407 407
408 n = NULL;
409 t = NULL;
408 p = (float *)((char *)pos + stride_pos * (j * 3 + k)); 410 p = (float *)((char *)pos + stride_pos * (j * 3 + k));
409 if (counts.existence_of_normal) 411 if (counts.existence_of_normal)
410 n = (float *)((char *)nor + stride_nor * (j * 3 + k)); 412 n = (float *)((char *)nor + stride_nor * (j * 3 + k));
@@ -415,14 +417,14 @@ evas_model_load_file_obj(Evas_Canvas3D_Mesh *mesh, Eina_File *file)
415 p[1] = ARRAY_2D(_vertices_obj, (ARRAY_2D(_triangles, j, (3 * k), 9) - 1), 1, 3); 417 p[1] = ARRAY_2D(_vertices_obj, (ARRAY_2D(_triangles, j, (3 * k), 9) - 1), 1, 3);
416 p[2] = ARRAY_2D(_vertices_obj, (ARRAY_2D(_triangles, j, (3 * k), 9) - 1), 2, 3); 418 p[2] = ARRAY_2D(_vertices_obj, (ARRAY_2D(_triangles, j, (3 * k), 9) - 1), 2, 3);
417 419
418 if (counts.existence_of_normal) 420 if (n)
419 { 421 {
420 n[0] = ARRAY_2D(_normales_obj, (ARRAY_2D(_triangles, j, (3 * k + 2), 9) - 1), 0, 3); 422 n[0] = ARRAY_2D(_normales_obj, (ARRAY_2D(_triangles, j, (3 * k + 2), 9) - 1), 0, 3);
421 n[1] = ARRAY_2D(_normales_obj, (ARRAY_2D(_triangles, j, (3 * k + 2), 9) - 1), 1, 3); 423 n[1] = ARRAY_2D(_normales_obj, (ARRAY_2D(_triangles, j, (3 * k + 2), 9) - 1), 1, 3);
422 n[2] = ARRAY_2D(_normales_obj, (ARRAY_2D(_triangles, j, (3 * k + 2), 9) - 1), 2, 3); 424 n[2] = ARRAY_2D(_normales_obj, (ARRAY_2D(_triangles, j, (3 * k + 2), 9) - 1), 2, 3);
423 } 425 }
424 426
425 if (counts.existence_of_tex_point) 427 if (t)
426 { 428 {
427 t[0] = ARRAY_2D(_tex_coords_obj, (ARRAY_2D(_triangles, j, (3 * k + 1), 9) - 1), 0, 3); 429 t[0] = ARRAY_2D(_tex_coords_obj, (ARRAY_2D(_triangles, j, (3 * k + 1), 9) - 1), 0, 3);
428 t[1] = ARRAY_2D(_tex_coords_obj, (ARRAY_2D(_triangles, j, (3 * k + 1), 9) - 1), 1, 3); 430 t[1] = ARRAY_2D(_tex_coords_obj, (ARRAY_2D(_triangles, j, (3 * k + 1), 9) - 1), 1, 3);