From 56048d13b73ec6e6a9c59d62e82f41e69a3994bd Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Tue, 25 Mar 2025 18:35:47 +0100 Subject: More safety with pointers using VLA function parameters --- src/arch/neon.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/arch/neon.h') diff --git a/src/arch/neon.h b/src/arch/neon.h index 19f6f9d..d5f5f8b 100644 --- a/src/arch/neon.h +++ b/src/arch/neon.h @@ -39,7 +39,7 @@ popcount_u32(uint32_t x) } STATIC void -pieces(cube_t *cube, uint8_t c[static 8], uint8_t e[static 12]) +pieces(cube_t cube[static 1], uint8_t c[static 8], uint8_t e[static 12]) { // First 8 bytes of the corner vector are copied from the c array vst1_u8(c, cube->corner); @@ -287,19 +287,19 @@ coord_esep(cube_t c) } STATIC_INLINE void -copy_corners(cube_t *dst, cube_t src) +copy_corners(cube_t dst[static 1], cube_t src) { dst->corner = src.corner; } STATIC_INLINE void -copy_edges(cube_t *dst, cube_t src) +copy_edges(cube_t dst[static 1], cube_t src) { dst->edge = src.edge; } STATIC_INLINE void -set_eo(cube_t *cube, int64_t eo) +set_eo(cube_t cube[static 1], int64_t eo) { // Temp array to store the NEON vector uint8_t mem[16]; -- cgit v1.3