aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/cube.h4
-rw-r--r--src/solvers/solutions.h4
-rw-r--r--src/utils/dbg_log.h3
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 *,
10STATIC cube_t getcube(uint64_t, uint64_t, uint64_t, uint64_t); 10STATIC cube_t getcube(uint64_t, uint64_t, uint64_t, uint64_t);
11 11
12STATIC oriented_cube_t readcube(const char *); 12STATIC oriented_cube_t readcube(const char *);
13STATIC int64_t writecube(oriented_cube_t, size_t n, char [n]); 13STATIC int64_t writecube(oriented_cube_t, size_t n, char *);
14STATIC uint8_t readco(const char *); 14STATIC uint8_t readco(const char *);
15STATIC uint8_t readcp(const char *); 15STATIC uint8_t readcp(const char *);
16STATIC uint8_t readeo(const char *); 16STATIC uint8_t readeo(const char *);
@@ -304,7 +304,7 @@ readcube(const char *buf)
304} 304}
305 305
306STATIC int64_t 306STATIC int64_t
307writecube(oriented_cube_t cube, size_t buf_size, char buf[buf_size]) 307writecube(oriented_cube_t cube, size_t buf_size, char *buf)
308{ 308{
309 int i; 309 int i;
310 uint8_t corner[8], edge[12]; 310 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(
14STATIC void appendsolution_dfs(const solution_moves_t [NON_NULL], size_t, 14STATIC void appendsolution_dfs(const solution_moves_t [NON_NULL], size_t,
15 const uint64_t *, size_t, uint8_t *, const solution_settings_t [NON_NULL], 15 const uint64_t *, size_t, uint8_t *, const solution_settings_t [NON_NULL],
16 solution_list_t [NON_NULL], 16 solution_list_t [NON_NULL],
17 solution_moves_t [static NTRANS * SOLUTION_MAXLEN], int64_t [NON_NULL]); 17 solution_moves_t [SIZE(NTRANS * SOLUTION_MAXLEN)], int64_t [NON_NULL]);
18STATIC int64_t appendsolution(const solution_moves_t [NON_NULL], 18STATIC int64_t appendsolution(const solution_moves_t [NON_NULL],
19 size_t, const uint64_t *, const solution_settings_t [NON_NULL], 19 size_t, const uint64_t *, const solution_settings_t [NON_NULL],
20 solution_list_t [NON_NULL]); 20 solution_list_t [NON_NULL]);
@@ -179,7 +179,7 @@ appendsolution_dfs(
179 uint8_t *tt, 179 uint8_t *tt,
180 const solution_settings_t settings[NON_NULL], 180 const solution_settings_t settings[NON_NULL],
181 solution_list_t list[NON_NULL], 181 solution_list_t list[NON_NULL],
182 solution_moves_t tsol[static NTRANS * SOLUTION_MAXLEN], 182 solution_moves_t tsol[SIZE(NTRANS * SOLUTION_MAXLEN)],
183 int64_t r[NON_NULL] 183 int64_t r[NON_NULL]
184) 184)
185{ 185{
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 *, ...);
7void 7void
8write_wrapper(void (*write)(const char *, void *), const char *str, ...) 8write_wrapper(void (*write)(const char *, void *), const char *str, ...)
9{ 9{
10 static const size_t len = 1000; 10 char message[1000];
11 char message[len];
12 va_list args; 11 va_list args;
13 12
14 va_start(args, str); 13 va_start(args, str);

Generated with cgit - Back to sebastiano.tronto.net