commit b15a85413723595d38ca8b3c86c81fcc8b982e26
parent 02c4a0578155894a9278610ab73ed1ec21be5ae3
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date: Wed, 30 Mar 2022 15:32:18 +0200
Fix clang warnings
Diffstat:
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/stardis-app.c b/src/stardis-app.c
@@ -384,7 +384,14 @@ stardis_init
if(desc->type == DESC_MAT_SOLID) {
tmp_res = check_delta_and_create_solid(stardis, desc);
} else if(desc->type == DESC_PROGRAM && desc->d.program->finalize) {
- tmp_res = desc->d.program->finalize(desc->d.program->prog_data);
+ enum stardis_return_status rs;
+ rs = desc->d.program->finalize(desc->d.program->prog_data);
+ switch(rs) {
+ case STARDIS_SUCCESS: tmp_res = RES_OK; break;
+ case STARDIS_FAILURE: tmp_res = RES_BAD_ARG; break;
+ default:
+ FATAL("error:" STR(__FILE__) ":" STR(__LINE__)": Invalid type.\n");
+ }
}
if(tmp_res != RES_OK && is_for_compute) {
res = tmp_res;
diff --git a/src/stardis-compute.c b/src/stardis-compute.c
@@ -855,7 +855,7 @@ auto_look_at
double radius;
double depth;
res_T res;
- ASSERT(scn && fov_x && proj_ratio && up);
+ ASSERT(scn && fov_x!=0 && proj_ratio!=0 && up);
ERR(sdis_scene_get_aabb(scn, lower, upper));