commit b8eb84f097fccd3f062d83b0ab91c9ca5ec1ab40 parent c580c88ed4971b8ff10f88ca1a9d90398f11c6a9 Author: Vincent Forest <vincent.forest@meso-star.com> Date: Tue, 18 Dec 2018 11:30:46 +0100 Fix a compilation warning with GCC 7 and above Diffstat:
| M | src/ssol_shape.c | | | 8 | ++++---- |
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/ssol_shape.c b/src/ssol_shape.c @@ -1388,11 +1388,11 @@ shape_fetched_raw_vertex_attrib if(res != RES_OK) return res; d3_splat(value, 1); + switch(s3d_attr.type) { - case S3D_FLOAT3: value[2] = (double)s3d_attr.value[2]; - case S3D_FLOAT2: value[1] = (double)s3d_attr.value[1]; - case S3D_FLOAT: value[0] = (double)s3d_attr.value[0]; - break; + case S3D_FLOAT3: value[2] = (double)s3d_attr.value[2]; FALLTHROUGH; + case S3D_FLOAT2: value[1] = (double)s3d_attr.value[1]; FALLTHROUGH; + case S3D_FLOAT: value[0] = (double)s3d_attr.value[0]; break; default: FATAL("Unexpected vertex attrib type\n"); break; } return RES_OK;