commit db1ae319245caa724a25474228d161a439d435c6
parent 17d3e8714f598642769e23a6dd3232ebaa9892fd
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date: Fri, 5 Apr 2024 09:37:35 +0200
Fix warnings
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/test_senc3d_utils.h b/src/test_senc3d_utils.h
@@ -22,6 +22,8 @@
#include <stdio.h>
+#include <star/senc3d.h>
+
#define OK(Expr) CHK((Expr) == RES_OK)
#define BA(Expr) CHK((Expr) == RES_BAD_ARG)
#define BO(Expr) CHK((Expr) == RES_BAD_OP)
@@ -113,7 +115,7 @@ static INLINE void
get_position(const unsigned ivert, double pos[3], void* context)
{
const struct context* ctx = context;
- ASSERT(pos && ctx && ctx->scale);
+ ASSERT(pos && ctx && ctx->scale != 0);
pos[0] = ctx->positions[ivert * 3 + 0] * ctx->scale + ctx->offset[0];
pos[1] = ctx->positions[ivert * 3 + 1] * ctx->scale + ctx->offset[1];
pos[2] = ctx->positions[ivert * 3 + 2] * ctx->scale + ctx->offset[2];