star-mc

Parallel estimation of Monte Carlo integrators
git clone git://git.meso-star.fr/star-mc.git
Log | Files | Refs | README | LICENSE

commit 851caedb7d89f55e07f3d5e16081377d0ea3d321
parent 8ccef91ef35de78b3ec6a29ad28197c854b00919
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Wed, 20 Oct 2021 11:36:12 +0200

Fix compilation warnings detected by gcc 11

Diffstat:
Msrc/test_smc_light_path.c | 10+++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/test_smc_light_path.c b/src/test_smc_light_path.c @@ -72,8 +72,8 @@ const unsigned cbox_walls_ids[] = { 2, 3, 7, 7, 6, 2 /* Back */ }; -static const unsigned cbox_walls_ntris = sizeof(cbox_walls_ids)/sizeof(unsigned[3]); -static const unsigned cbox_walls_nverts = sizeof(cbox_walls)/sizeof(float[3]); +static const unsigned cbox_walls_ntris = sizeof(cbox_walls_ids)/(3*sizeof(unsigned)); +static const unsigned cbox_walls_nverts = sizeof(cbox_walls)/(3*sizeof(float)); static struct cbox_desc cbox_walls_desc = { cbox_walls, cbox_walls_ids }; /******************************************************************************* @@ -109,15 +109,15 @@ static const unsigned cbox_block_ids[] = { 0, 1, 5, 5, 4, 0 }; -static const unsigned cbox_block_ntris = sizeof(cbox_block_ids)/sizeof(unsigned[3]); +static const unsigned cbox_block_ntris = sizeof(cbox_block_ids)/(3*sizeof(unsigned)); static const unsigned cbox_short_block_nverts = - sizeof(cbox_short_block)/sizeof(float[3]); + sizeof(cbox_short_block)/(3*sizeof(float)); static struct cbox_desc cbox_short_block_desc = { cbox_short_block, cbox_block_ids }; static const unsigned cbox_tall_block_nverts = - sizeof(cbox_tall_block)/sizeof(float[3]); + sizeof(cbox_tall_block)/(3*sizeof(float)); static struct cbox_desc cbox_tall_block_desc = { cbox_tall_block, cbox_block_ids };