From fc41f7917531693680b5baf71ffe38c47333fe84 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Mon, 6 Apr 2026 15:55:33 +0200 Subject: Make the project build with Microsoft's broken C compiler. MSVC is not fully C11-compliant, even when compiling with /std:c11. Some changes were needed to make the codebase compatible. Notably, the notation a[static N] and a[n] for function parameters of array type is not supported, so that had to be hidden behind a macro. Atomic types are also an experimental feature, apparently, but at least they work with the correct compiler flag. One thing that MSVC does well, however, is warning on integer conversions on /W4 level. I am not sure if Clang and GCC have something similar, so I took this chance to fix some of these. --- test/121_h48map/h48map_tests.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'test/121_h48map/h48map_tests.c') diff --git a/test/121_h48map/h48map_tests.c b/test/121_h48map/h48map_tests.c index 927b157..e06c395 100644 --- a/test/121_h48map/h48map_tests.c +++ b/test/121_h48map/h48map_tests.c @@ -2,11 +2,11 @@ #define MAXPOS 1000 -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]); +void h48map_create(h48map_t [NON_NULL], uint64_t, uint64_t); +void h48map_destroy(h48map_t [NON_NULL]); +void h48map_insertmin(h48map_t [NON_NULL], uint64_t, uint64_t); +uint64_t h48map_value(h48map_t [NON_NULL], uint64_t); +kvpair_t h48map_nextkvpair(h48map_t [NON_NULL], uint64_t [NON_NULL]); char str[STRLENMAX]; -- cgit v1.3