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 --- test/111_h48map/h48map_tests.c | 10 +++++----- test/112_gendata_h48short/gendata_h48short_tests.c | 8 ++++---- test/test.h | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) (limited to 'test') diff --git a/test/111_h48map/h48map_tests.c b/test/111_h48map/h48map_tests.c index 7fdfb3d..927b157 100644 --- a/test/111_h48map/h48map_tests.c +++ b/test/111_h48map/h48map_tests.c @@ -2,11 +2,11 @@ #define MAXPOS 1000 -void h48map_create(h48map_t *, uint64_t, uint64_t); -void h48map_destroy(h48map_t *); -void h48map_insertmin(h48map_t *, uint64_t, uint64_t); -uint64_t h48map_value(h48map_t *, uint64_t); -kvpair_t h48map_nextkvpair(h48map_t *, uint64_t *); +void h48map_create(h48map_t [static 1], uint64_t, uint64_t); +void h48map_destroy(h48map_t [static 1]); +void h48map_insertmin(h48map_t [static 1], uint64_t, uint64_t); +uint64_t h48map_value(h48map_t [static 1], uint64_t); +kvpair_t h48map_nextkvpair(h48map_t [static 1], uint64_t [static 1]); char str[STRLENMAX]; diff --git a/test/112_gendata_h48short/gendata_h48short_tests.c b/test/112_gendata_h48short/gendata_h48short_tests.c index b6ff00e..2ed42c1 100644 --- a/test/112_gendata_h48short/gendata_h48short_tests.c +++ b/test/112_gendata_h48short/gendata_h48short_tests.c @@ -2,11 +2,11 @@ #define MAXPOS 200 -void h48map_create(h48map_t *, uint64_t, uint64_t); -void h48map_destroy(h48map_t *); -kvpair_t h48map_nextkvpair(h48map_t *, uint64_t *); +void h48map_create(h48map_t [static 1], uint64_t, uint64_t); +void h48map_destroy(h48map_t [static 1]); +kvpair_t h48map_nextkvpair(h48map_t [static 1], uint64_t [static 1]); size_t gendata_cocsep(void *, uint64_t *, cube_t *); -uint64_t gendata_h48short(gendata_h48short_arg_t *); +uint64_t gendata_h48short(gendata_h48short_arg_t [static 1]); char str[STRLENMAX]; diff --git a/test/test.h b/test/test.h index 8c117cb..e753977 100644 --- a/test/test.h +++ b/test/test.h @@ -12,7 +12,7 @@ #include "../src/arch/arch.h" #include "../src/solvers/solutions_types_macros.h" #include "../src/solvers/tables_types_macros.h" -#include "../src/solvers/h48/coordinate_macros.h" +#include "../src/solvers/h48/coordinate_types_macros.h" #include "../src/solvers/h48/map_types_macros.h" #include "../src/solvers/h48/gendata_types_macros.h" #include "../src/solvers/coord/types_macros.h" -- cgit v1.3