From 6c4453fdc49e700969bc465e365dd610d7e137c2 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Mon, 6 Apr 2026 09:28:50 +0100 Subject: Fixes for Microsoft's stupid broken compiler --- src/core/cube.h | 4 ++-- src/solvers/solutions.h | 4 ++-- src/utils/dbg_log.h | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/core/cube.h b/src/core/cube.h index f52c15e..1c21ce1 100644 --- a/src/core/cube.h +++ b/src/core/cube.h @@ -10,7 +10,7 @@ STATIC void getcube_fix(long long *, long long *, STATIC cube_t getcube(uint64_t, uint64_t, uint64_t, uint64_t); STATIC oriented_cube_t readcube(const char *); -STATIC int64_t writecube(oriented_cube_t, size_t n, char [n]); +STATIC int64_t writecube(oriented_cube_t, size_t n, char *); STATIC uint8_t readco(const char *); STATIC uint8_t readcp(const char *); STATIC uint8_t readeo(const char *); @@ -304,7 +304,7 @@ readcube(const char *buf) } STATIC int64_t -writecube(oriented_cube_t cube, size_t buf_size, char buf[buf_size]) +writecube(oriented_cube_t cube, size_t buf_size, char *buf) { int i; uint8_t corner[8], edge[12]; diff --git a/src/solvers/solutions.h b/src/solvers/solutions.h index f1f0c58..beedc64 100644 --- a/src/solvers/solutions.h +++ b/src/solvers/solutions.h @@ -14,7 +14,7 @@ STATIC bool appendinverse( STATIC void appendsolution_dfs(const solution_moves_t [NON_NULL], size_t, const uint64_t *, size_t, uint8_t *, const solution_settings_t [NON_NULL], solution_list_t [NON_NULL], - solution_moves_t [static NTRANS * SOLUTION_MAXLEN], int64_t [NON_NULL]); + solution_moves_t [SIZE(NTRANS * SOLUTION_MAXLEN)], int64_t [NON_NULL]); STATIC int64_t appendsolution(const solution_moves_t [NON_NULL], size_t, const uint64_t *, const solution_settings_t [NON_NULL], solution_list_t [NON_NULL]); @@ -179,7 +179,7 @@ appendsolution_dfs( uint8_t *tt, const solution_settings_t settings[NON_NULL], solution_list_t list[NON_NULL], - solution_moves_t tsol[static NTRANS * SOLUTION_MAXLEN], + solution_moves_t tsol[SIZE(NTRANS * SOLUTION_MAXLEN)], int64_t r[NON_NULL] ) { diff --git a/src/utils/dbg_log.h b/src/utils/dbg_log.h index d737ff2..08d42a3 100644 --- a/src/utils/dbg_log.h +++ b/src/utils/dbg_log.h @@ -7,8 +7,7 @@ void write_wrapper(void (*)(const char *, void *), const char *, ...); void write_wrapper(void (*write)(const char *, void *), const char *str, ...) { - static const size_t len = 1000; - char message[len]; + char message[1000]; va_list args; va_start(args, str); -- cgit v1.3