commit d0864ba7039e87982c546a9eccae68a76ffe9991
parent 024d68dc1f18f50ed5f5503ef47499d7da5fa375
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Wed, 13 Oct 2021 16:51:08 +0200
Fix compilation warnings detected by gcc 11
Diffstat:
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/test_suvm_ball.h b/src/test_suvm_ball.h
@@ -5329,7 +5329,7 @@ const double ball_vertices[] = {
-1.3397540e-01, -8.3003223e-02, -8.1768147e-02,
1.0188783e-01, -8.7012677e-02, -1.2649865e-01
};
-const size_t ball_nvertices = sizeof(ball_vertices) / sizeof(double[3]);
+const size_t ball_nvertices = sizeof(ball_vertices) / (sizeof(double)*3);
const size_t ball_tetrahedra[] = {
4099, 4031, 278, 4086,
@@ -25032,6 +25032,6 @@ const size_t ball_tetrahedra[] = {
5157, 3404, 3494, 3391,
1380, 1381, 4890, 1429
};
-const size_t ball_ntetrahedra = sizeof(ball_tetrahedra)/sizeof(size_t[4]);
+const size_t ball_ntetrahedra = sizeof(ball_tetrahedra)/(sizeof(size_t)*4);
#endif /* TEST_SUVM_BALL_H */
diff --git a/src/test_suvm_box.h b/src/test_suvm_box.h
@@ -27,7 +27,7 @@ static const double box_vertices[9/*#vertices*/*3/*#coords per vertex*/] = {
1.0, 1.0, 1.0,
0.5, 0.5, 0.5
};
-static const size_t box_nverts = sizeof(box_vertices) / sizeof(double[3]);
+static const size_t box_nverts = sizeof(box_vertices) / (sizeof(double)*3);
/* The following array lists the indices toward the 3D vertices of each
* boundary triangle. The index 8 references the vertex at the center of the
@@ -46,7 +46,6 @@ static const size_t box_indices[12/*#tetras*/*4/*#indices per tetra*/] = {
2, 7, 6, 8, 7, 2, 3, 8, /* +Y */
0, 5, 1, 8, 5, 0, 4, 8 /* -Y */
};
-static const size_t box_ntetras = sizeof(box_indices) / sizeof(size_t[4]);
-
+static const size_t box_ntetras = sizeof(box_indices) / (sizeof(size_t)*4);
#endif /* TEST_SUVM_BOX_H */